From: David Miller <davem@davemloft.net>
To: glider@google.com
Cc: dvyukov@google.com, kcc@google.com, edumazet@google.com,
lucien.xin@gmail.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH v2] sctp: don't dereference ptr before leaving _sctp_walk_{params,errors}()
Date: Fri, 14 Jul 2017 10:54:31 -0700 (PDT) [thread overview]
Message-ID: <20170714.105431.403659291323482633.davem@davemloft.net> (raw)
In-Reply-To: <CAG_fn=XtmFsygwP=o5_pS1fHXUamAy=bib-7DZvX1n9P4MwCgQ@mail.gmail.com>
From: Alexander Potapenko <glider@google.com>
Date: Fri, 14 Jul 2017 19:33:54 +0200
> On Fri, Jul 14, 2017 at 7:23 PM, David Miller <davem@davemloft.net> wrote:
>> From: Alexander Potapenko <glider@google.com>
>> Date: Fri, 14 Jul 2017 18:33:01 +0200
>>
>>> On Fri, Jul 14, 2017 at 5:58 PM, David Miller <davem@davemloft.net> wrote:
>>>> From: Alexander Potapenko <glider@google.com>
>>>> Date: Fri, 14 Jul 2017 12:03:29 +0200
>>>>
>>>>> v2: per comment from David Miller, make sure the whole iterator->length
>>>>> fits into the remaining buffer.
>>>>
>>>> Please compile and functionally test your changes:
>>>>
>>>> In file included from ./include/linux/compiler.h:58:0,
>>>> from ./include/uapi/linux/stddef.h:1,
>>>> from ./include/linux/stddef.h:4,
>>>> from ./include/uapi/linux/posix_types.h:4,
>>>> from ./include/uapi/linux/types.h:13,
>>>> from ./include/linux/types.h:5,
>>>> from net/sctp/sm_statefuns.c:48:
>>>> net/sctp/sm_statefuns.c: In function ‘sctp_sf_do_reconf’:
>>>> ./include/net/sctp/sctp.h:472:24: error: unknown type name ‘sctp_paramhdr_t’
>>>> (pos.v + offsetof(sctp_paramhdr_t, length) + sizeof(pos.p->length) <\
>>>> ^
>>> Oops. Fixed.
>>
>> Did you functionally test the new version or just do a quick compile
>> check and resubmit?
> I've checked that the kernel still works, but unfortunately I couldn't
> check whether or not this affected the uninit memory, as KMSAN
> currently works on a fixed kernel revision. The compilation error was
> actually caused by me failing to test the kernel when porting the fix
> from that revision to upstream.
>
>> I really want you to test this if the logic has been changed.
> Do you mean any specific tests in addition to, say, running the
> reproducer on which the uninit use was reported?
I mean the reproducer.
next prev parent reply other threads:[~2017-07-14 17:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 10:03 Alexander Potapenko
2017-07-14 15:58 ` David Miller
2017-07-14 16:33 ` Alexander Potapenko
2017-07-14 17:23 ` David Miller
2017-07-14 17:33 ` Alexander Potapenko
2017-07-14 17:54 ` David Miller [this message]
2017-07-17 9:37 ` Alexander Potapenko
2017-07-14 18:58 ` kbuild test robot
2017-07-14 20:22 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170714.105431.403659291323482633.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dvyukov@google.com \
--cc=edumazet@google.com \
--cc=glider@google.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®