Re: [syzbot] [net?] KASAN: slab-use-after-free Read in unix_stream_read_actor (2)

From: Shoaib Rao
Date: Thu Sep 05 2024 - 15:07:30 EST



On 9/5/2024 1:04 AM, Eric Dumazet wrote:
On Thu, Sep 5, 2024 at 9:35 AM Shoaib Rao <rao.shoaib@xxxxxxxxxx> wrote:
Hi All,

I am not able to reproduce the issue. I have run the C program at least
100 times in a loop. In the I do get an EFAULT, not sure if that is
intentional or not but no panic. Should I be doing something
differently? The kernel version I am using is
v6.11-rc6-70-gc763c4339688. Later I can try with the exact version.

Have you selected ASAN in your kernel build ?

CONFIG_KASAN=y
CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y
CONFIG_KASAN_GENERIC=y
CONFIG_KASAN_INLINE=y
CONFIG_KASAN_STACK=y
CONFIG_KASAN_VMALLOC=y

[rshoaib@turbo-2 debug_pnic]$ gcc cause_panic.c -o panic_sys
[rshoaib@turbo-2 debug_pnic]$ strace -f ./panic_sys
execve("./panic_sys", ["./panic_sys"], 0x7ffe7d271d38 /* 63 vars */) = 0
brk(NULL) = 0x18104000

Hi Eric,

Yes. The config is

[rshoaib@turbo-2 ~]$ grep KASAN /boot/config-`uname -r`
++ uname -r
+ grep --color=auto KASAN /boot/config-6.11.0-rao-rc6-gc763c4339688-dirty
CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_KASAN=y
CONFIG_KASAN_GENERIC=y
# CONFIG_KASAN_OUTLINE is not set
CONFIG_KASAN_INLINE=y
CONFIG_KASAN_STACK=y
CONFIG_KASAN_VMALLOC=y

The only config missing is

CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX

I do not have that option.

Shoaib