mbox series

[RFC,0/1,RESEND] Fix KASAN: slab-out-of-bounds Read in sk_psock_get

Message ID 20220713181324.14228-1-khalid.masum.92@gmail.com (mailing list archive)
Headers show
Series Fix KASAN: slab-out-of-bounds Read in sk_psock_get | expand

Message

Khalid Masum July 13, 2022, 6:13 p.m. UTC
Using size of sk_psock as the size for kcm_psock_cache size no longer
reproduces the issue. There might be a better way to solve this issue
though so I would like to ask for feedback.

The patch was sent to the wrong mailing list so resending it. Please
ignore the previous one.

Reported-and-tested-by: syzbot+1fa91bcd05206ff8cbb5@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=1fa91bcd05206ff8cbb5

Khalid Masum (1):
  net: kcm: Use sk_psock size for kcm_psock_cache

 net/kcm/kcmsock.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jakub Kicinski July 13, 2022, 6:56 p.m. UTC | #1
On Thu, 14 Jul 2022 00:13:23 +0600 Khalid Masum wrote:
> Using size of sk_psock as the size for kcm_psock_cache size no longer
> reproduces the issue. There might be a better way to solve this issue
> though so I would like to ask for feedback.
> 
> The patch was sent to the wrong mailing list so resending it. Please
> ignore the previous one.

What happened to my other off-list feedback?

I pointed you at another solution which was already being discussed -
does it solve the issue you're fixing?
Khalid Masum July 14, 2022, 3:55 a.m. UTC | #2
On Thu, Jul 14, 2022 at 12:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Thu, 14 Jul 2022 00:13:23 +0600 Khalid Masum wrote:
> > Using size of sk_psock as the size for kcm_psock_cache size no longer
> > reproduces the issue. There might be a better way to solve this issue
> > though so I would like to ask for feedback.
> >
> > The patch was sent to the wrong mailing list so resending it. Please
> > ignore the previous one.
>
> What happened to my other off-list feedback?
>
> I pointed you at another solution which was already being discussed -
> does it solve the issue you're fixing?

Yes, this patch solves the issue I am fixing.

thanks,
Khalid Masum
Jakub Kicinski July 14, 2022, 3:58 a.m. UTC | #3
On Thu, 14 Jul 2022 09:55:18 +0600 Khalid Masum wrote:
> On Thu, Jul 14, 2022 at 12:56 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Thu, 14 Jul 2022 00:13:23 +0600 Khalid Masum wrote:  
> > > Using size of sk_psock as the size for kcm_psock_cache size no longer
> > > reproduces the issue. There might be a better way to solve this issue
> > > though so I would like to ask for feedback.
> > >
> > > The patch was sent to the wrong mailing list so resending it. Please
> > > ignore the previous one.  
> >
> > What happened to my other off-list feedback?
> >
> > I pointed you at another solution which was already being discussed -
> > does it solve the issue you're fixing?  
> 
> Yes, this patch solves the issue I am fixing.

Thanks for checking! You can send your

Tested-by:

tag in reply to the most recent posting if you'd like:

https://lore.kernel.org/all/165772238175.1757.4978340330606055982.stgit@oracle-102.nfsv4.dev/