diff mbox

KASAN: use-after-free Read in rds_tcp_tune

Message ID 1518627728.3678.2.camel@perches.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Joe Perches Feb. 14, 2018, 5:02 p.m. UTC
On Wed, 2018-02-14 at 16:55 +0100, Dmitry Vyukov wrote:
> On Wed, Feb 14, 2018 at 4:35 PM, Sowmini Varadhan <sowmini.varadhan@oracle.com> wrote:
> > btw, checkpatch.pl complains about the syzbot*@syzkaller.appspotmail.com
> > addresses as "Unrecognized email address", we should fix that
> > error from checkpatch at some point.
> 
> Interesting. Looking at checkpatch.pl I think it wants all addresses
> to be in <>, i.e.
> Reported-by: <syzbot+bbd8e9a06452cc48059b@syzkaller.appspotmail.com>
> There probably was some reason to enforce this, so I think I will
> change the syzbot email template to include <>.
> Thanks!

Not really.

It's the somewhat unusual + in the address
that perl needs quoted before a substitution.

I believe this fixes it in checkpatch.
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dmitry Vyukov Feb. 14, 2018, 5:16 p.m. UTC | #1
On Wed, Feb 14, 2018 at 6:02 PM, Joe Perches <joe@perches.com> wrote:
> On Wed, 2018-02-14 at 16:55 +0100, Dmitry Vyukov wrote:
>> On Wed, Feb 14, 2018 at 4:35 PM, Sowmini Varadhan <sowmini.varadhan@oracle.com> wrote:
>> > btw, checkpatch.pl complains about the syzbot*@syzkaller.appspotmail.com
>> > addresses as "Unrecognized email address", we should fix that
>> > error from checkpatch at some point.
>>
>> Interesting. Looking at checkpatch.pl I think it wants all addresses
>> to be in <>, i.e.
>> Reported-by: <syzbot+bbd8e9a06452cc48059b@syzkaller.appspotmail.com>
>> There probably was some reason to enforce this, so I think I will
>> change the syzbot email template to include <>.
>> Thanks!
>
> Not really.
>
> It's the somewhat unusual + in the address
> that perl needs quoted before a substitution.
>
> I believe this fixes it in checkpatch.
> ---
>  scripts/checkpatch.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 3d4040322ae1..2b8397da39d3 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1075,7 +1075,7 @@ sub parse_email {
>         } elsif ($formatted_email =~ /(\S+\@\S+)(.*)$/) {
>                 $address = $1;
>                 $comment = $2 if defined $2;
> -               $formatted_email =~ s/$address.*$//;
> +               $formatted_email =~ s/\Q$address\E.*$//;
>                 $name = $formatted_email;
>                 $name = trim($name);
>                 $name =~ s/^\"|\"$//g;


I can confirm that running
$ git show HEAD | scripts/checkpatch.pl -
on a commit that contains a syzbot Reported-by tag does not produce
the warning anymore.

Joe, do you mind mailing this as patch?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Perches Feb. 14, 2018, 5:32 p.m. UTC | #2
On Wed, 2018-02-14 at 18:16 +0100, Dmitry Vyukov wrote:
> On Wed, Feb 14, 2018 at 6:02 PM, Joe Perches <joe@perches.com> wrote:
> > On Wed, 2018-02-14 at 16:55 +0100, Dmitry Vyukov wrote:
> > > On Wed, Feb 14, 2018 at 4:35 PM, Sowmini Varadhan <sowmini.varadhan@oracle.com> wrote:
> > > > btw, checkpatch.pl complains about the syzbot*@syzkaller.appspotmail.com
> > > > addresses as "Unrecognized email address", we should fix that
> > > > error from checkpatch at some point.
> > > 
> > > Interesting. Looking at checkpatch.pl I think it wants all addresses
> > > to be in <>, i.e.
> > > Reported-by: <syzbot+bbd8e9a06452cc48059b@syzkaller.appspotmail.com>
> > > There probably was some reason to enforce this, so I think I will
> > > change the syzbot email template to include <>.
> > > Thanks!
> > 
> > Not really.
> > 
> > It's the somewhat unusual + in the address
> > that perl needs quoted before a substitution.
> > 
> > I believe this fixes it in checkpatch.
> > ---
> >  scripts/checkpatch.pl | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > @@ -1075,7 +1075,7 @@ sub parse_email {
> >         } elsif ($formatted_email =~ /(\S+\@\S+)(.*)$/) {
> >                 $address = $1;
> >                 $comment = $2 if defined $2;
> > -               $formatted_email =~ s/$address.*$//;
> > +               $formatted_email =~ s/\Q$address\E.*$//;
> >                 $name = $formatted_email;
> >                 $name = trim($name);
> >                 $name =~ s/^\"|\"$//g;
> 
> 
> I can confirm that running
> $ git show HEAD | scripts/checkpatch.pl -
> on a commit that contains a syzbot Reported-by tag does not produce
> the warning anymore.
> 
> Joe, do you mind mailing this as patch?

'course not.  It's nice you tested it.

I did on the last thousand commits without
apparent change.

$ git log --format=oneline --no-merges -1000 | \
  cut -f1 -d" " | \
  while read commit ; do \
    ./scripts/checkpatch.pl --git $commit --types=bad_sign_off --terse ; \
  done

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3d4040322ae1..2b8397da39d3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1075,7 +1075,7 @@  sub parse_email {
 	} elsif ($formatted_email =~ /(\S+\@\S+)(.*)$/) {
 		$address = $1;
 		$comment = $2 if defined $2;
-		$formatted_email =~ s/$address.*$//;
+		$formatted_email =~ s/\Q$address\E.*$//;
 		$name = $formatted_email;
 		$name = trim($name);
 		$name =~ s/^\"|\"$//g;