Subject: Re: [syzbot] [bpf?] [net?] KASAN: slab-use-after-free Read in nla_find

From: Jakub Kicinski <[email-masked]>
Date: Mon, 18 Dec 2023 15:17:05 -0800

On Mon, 18 Dec 2023 06:43:26 -0800 syzbot wrote:
>  __dump_stack lib/dump_stack.c:88 [inline]
>  dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
>  print_address_description mm/kasan/report.c:364 [inline]
>  print_report+0xc4/0x620 mm/kasan/report.c:475
>  kasan_report+0xda/0x110 mm/kasan/report.c:588
>  nla_ok include/net/netlink.h:1230 [inline]
>  nla_find+0x120/0x130 lib/nlattr.c:746
>  nla_find_nested include/net/netlink.h:1260 [inline]
>  ____bpf_skb_get_nlattr_nest net/core/filter.c:209 [inline]

This needs nla_ok() instead of playing with nla_len directly.
Will send a fix soon..