lkml.org 
[lkml]   [2022]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/1] net: kcm: Use sk_psock size for kcm_psock_cache
On Wed, 13 Jul 2022 12:32:04 +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>

Odd CC list, it looks like a netdev problem but netdev@ is not copied.

We had an other parson looking at this on netdev. Is this happening
when legit kernel socket gets mixed with BPF sockmap?

Does this fix work?

https://lore.kernel.org/netdev/165030056960.5073.6664402939918720250.stgit@oracle-102.nfsv4.dev/

\
 
 \ /
  Last update: 2022-07-13 20:17    [W:0.061 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site