From: Greg KH <gregkh@linuxfoundation.org>
To: Khalid Masum <khalid.masum.92@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Pavel Skripkin <paskripkin@gmail.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Stefano Garzarella <sgarzare@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Nikolay Aleksandrov <nikolay@nvidia.com>,
syzbot+1fa91bcd05206ff8cbb5@syzkaller.appspotmail.com
Subject: Re: [RFC PATCH 1/1] net: kcm: Use sk_psock size for kcm_psock_cache
Date: Wed, 13 Jul 2022 08:37:14 +0200 [thread overview]
Message-ID: <Ys5oGuh2WCgEG5Js@kroah.com> (raw)
In-Reply-To: <20220713063204.6294-2-khalid.masum.92@gmail.com>
On Wed, Jul 13, 2022 at 12:32:04PM +0600, Khalid Masum wrote:
> `struct sock` has a member `sk_user_data`, which got its memory allocated
> in `kcm_attach` by `kcm_psock_cache` with the size of `kcm_psock`. Which
> is not enough when the member is used as `sk_psock` causing out of bound
> read.
>
> Use `sk_psock` size to allocate memory instead for `sk_user_data`.
>
> Reported-by: syzbot+1fa91bcd05206ff8cbb5@syzkaller.appspotmail.com
> Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
> ---
> net/kcm/kcmsock.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
What commit id does this fix?
thanks,
greg k-h
next prev parent reply other threads:[~2022-07-13 6:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 6:32 [RFC PATCH 0/1] Fix KASAN: slab-out-of-bounds Read in sk_psock_get Khalid Masum
2022-07-13 6:32 ` [RFC PATCH 1/1] net: kcm: Use sk_psock size for kcm_psock_cache Khalid Masum
2022-07-13 6:37 ` Greg KH [this message]
2022-07-13 18:16 ` Jakub Kicinski
2022-07-13 18:25 ` Khalid Masum
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=Ys5oGuh2WCgEG5Js@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ast@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=khalid.masum.92@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=nikolay@nvidia.com \
--cc=pabeni@redhat.com \
--cc=paskripkin@gmail.com \
--cc=sgarzare@redhat.com \
--cc=skhan@linuxfoundation.org \
--cc=syzbot+1fa91bcd05206ff8cbb5@syzkaller.appspotmail.com \
/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;
as well as URLs for NNTP newsgroup(s).