[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH4c4jK9nYf2n51m=eaS4gtx9+cjzhXDAb741BA+burmQtD28w@mail.gmail.com>
Date: Fri, 25 Jul 2025 17:25:34 +0530
From: Pranav Tyagi <pranav.tyagi03@...il.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: john.fastabend@...il.com, jakub@...udflare.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, ast@...nel.org, cong.wang@...edance.com,
netdev@...r.kernel.org, bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
skhan@...uxfoundation.org, linux-kernel-mentees@...ts.linux.dev,
syzbot+b18872ea9631b5dcef3b@...kaller.appspotmail.com
Subject: Re: [PATCH] net: skmsg: fix NULL pointer dereference in sk_msg_recvmsg()
On Thu, Jul 17, 2025 at 4:40 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> 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@...kaller.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@...il.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
>
>
Hi Paolo,
Apologies for a delayed response. I will send a v2 of the patch with all the
required changes shortly. Also, as I am a beginner at kernel work, my initial
intention was to just fix the bug and (honestly) I did not think about
the cause of
bad sges. But, I will definitely take a deep dive and try my level best
to look for a suitable explanation for the same.
Thanks for the feedback.
Regards
Pranav Tyagi
Powered by blists - more mailing lists