From: Paolo Abeni <pabeni@redhat.com>
To: Pranav Tyagi <pranav.tyagi03@gmail.com>,
john.fastabend@gmail.com, jakub@cloudflare.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
ast@kernel.org, cong.wang@bytedance.com, netdev@vger.kernel.org,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev,
syzbot+b18872ea9631b5dcef3b@syzkaller.appspotmail.com
Subject: Re: [PATCH] net: skmsg: fix NULL pointer dereference in sk_msg_recvmsg()
Date: Thu, 17 Jul 2025 13:10:26 +0200 [thread overview]
Message-ID: <0f6e9770-1c79-418e-9135-df692f495a91@redhat.com> (raw)
In-Reply-To: <20250715081158.7651-1-pranav.tyagi03@gmail.com>
On 7/15/25 10:11 AM, Pranav Tyagi wrote:
> A NULL page from sg_page() in sk_msg_recvmsg() can reach
> __kmap_local_page_prot() and crash the kernel. Add a check for the page
> before calling copy_page_to_iter() and fail early with -EFAULT to
> prevent the crash.
Interesting. I thought the sge in this case are build from the kernel, I
did not expect a null page to be possible. Can you describe in the
commit message how such bad sges are created?
>
> Reported-by: syzbot+b18872ea9631b5dcef3b@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=b18872ea9631b5dcef3b
> Fixes: 2bc793e3272a ("skmsg: Extract __tcp_bpf_recvmsg() and tcp_bpf_wait_data()")
> Signed-off-by: Pranav Tyagi <pranav.tyagi03@gmail.com>
Does not apply to net. Please rebase and resend, adding the target tree
in the subj prefix and specifying a revision number.
Thanks,
Paolo
next prev parent reply other threads:[~2025-07-17 11:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 8:11 [PATCH] net: skmsg: fix NULL pointer dereference in sk_msg_recvmsg() Pranav Tyagi
2025-07-15 8:19 ` Greg KH
2025-07-17 11:10 ` Paolo Abeni [this message]
2025-07-25 11:55 ` Pranav Tyagi
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=0f6e9770-1c79-418e-9135-df692f495a91@redhat.com \
--to=pabeni@redhat.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pranav.tyagi03@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=syzbot+b18872ea9631b5dcef3b@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).