syzbot


KASAN: use-after-free Read in vlan_dev_get_iflink

Status: upstream: reported C repro on 2025/04/19 07:52
Reported-by: syzbot+89debf5200e40e988a32@syzkaller.appspotmail.com
First crash: 61d, last: 1h22m
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in vlan_dev_get_iflink C error 18 954d 1893d 0/1 upstream: reported C repro on 2020/04/13 08:02
linux-4.14 KASAN: use-after-free Read in vlan_dev_get_iflink C error 12 1016d 1880d 0/1 upstream: reported C repro on 2020/04/25 21:56
linux-5.15 KASAN: use-after-free Read in vlan_dev_get_iflink 4 293d 322d 0/3 auto-obsoleted due to no activity on 2024/12/07 21:23
upstream KASAN: use-after-free Read in vlan_dev_get_iflink net C error error 13 1622d 1791d 0/29 auto-obsoleted due to no activity on 2022/09/27 12:32
android-5-15 KASAN: use-after-free Read in vlan_dev_get_iflink origin:lts syz 12 19d 310d 0/2 premoderation: reported syz repro on 2024/08/13 02:40
Last patch testing requests (5)
Created Duration User Patch Repo Result
2025/05/19 01:45 15m retest repro android13-5.10-lts report log
2025/05/19 01:45 13m retest repro android13-5.10-lts report log
2025/05/19 01:45 17m retest repro android13-5.10-lts report log
2025/05/19 01:45 9m retest repro android13-5.10-lts report log
2025/05/19 01:45 15m retest repro android13-5.10-lts report log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in vlan_dev_get_iflink+0x6d/0x70 net/8021q/vlan_dev.c:757
Read of size 4 at addr ffff8881017a2100 by task kworker/u4:0/7

CPU: 0 PID: 7 Comm: kworker/u4:0 Not tainted 5.10.238-syzkaller-00282-gd76d4cd0623a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: netns cleanup_net
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0xe2/0x130 mm/kasan/report.c:452
 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
 vlan_dev_get_iflink+0x6d/0x70 net/8021q/vlan_dev.c:757
 dev_get_iflink+0x70/0xc0 net/core/dev.c:824
 default_operstate net/core/link_watch.c:41 [inline]
 rfc2863_policy+0x124/0x2b0 net/core/link_watch.c:53
 linkwatch_do_dev+0x3b/0x140 net/core/link_watch.c:160
 linkwatch_forget_dev+0x170/0x180 net/core/link_watch.c:238
 netdev_wait_allrefs net/core/dev.c:10215 [inline]
 netdev_run_todo+0x2bb/0xd20 net/core/dev.c:10331
 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:112
 default_device_exit_batch+0x335/0x390 net/core/dev.c:11288
 ops_exit_list net/core/net_namespace.c:190 [inline]
 cleanup_net+0x5fb/0xb70 net/core/net_namespace.c:609
 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301
 worker_thread+0xa6a/0x13b0 kernel/workqueue.c:2447
 kthread+0x346/0x3d0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

Allocated by task 283:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:430 [inline]
 ____kasan_kmalloc mm/kasan/common.c:509 [inline]
 __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:518
 kasan_kmalloc include/linux/kasan.h:254 [inline]
 __kmalloc+0x1a7/0x330 mm/slub.c:4033
 __kmalloc_node include/linux/slab.h:418 [inline]
 kmalloc_node include/linux/slab.h:575 [inline]
 kvmalloc_node+0x88/0x130 mm/util.c:612
 kvmalloc include/linux/mm.h:822 [inline]
 kvzalloc include/linux/mm.h:830 [inline]
 alloc_netdev_mqs+0x88/0xc80 net/core/dev.c:10527
 rtnl_create_link+0x242/0x930 net/core/rtnetlink.c:3195
 __rtnl_newlink net/core/rtnetlink.c:3472 [inline]
 rtnl_newlink+0x105e/0x1640 net/core/rtnetlink.c:3530
 rtnetlink_rcv_msg+0x9db/0xb90 net/core/rtnetlink.c:5610
 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2485
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5628
 netlink_unicast_kernel net/netlink/af_netlink.c:1307 [inline]
 netlink_unicast+0x87c/0xa40 net/netlink/af_netlink.c:1333
 netlink_sendmsg+0x88d/0xb30 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:652 [inline]
 __sock_sendmsg net/socket.c:664 [inline]
 __sys_sendto+0x41d/0x580 net/socket.c:2006
 __do_sys_sendto net/socket.c:2018 [inline]
 __se_sys_sendto net/socket.c:2014 [inline]
 __x64_sys_sendto+0xe5/0x100 net/socket.c:2014
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Freed by task 7:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
 kasan_slab_free include/linux/kasan.h:220 [inline]
 slab_free_hook mm/slub.c:1595 [inline]
 slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1621
 slab_free mm/slub.c:3203 [inline]
 kfree+0xc0/0x270 mm/slub.c:4191
 kvfree+0x35/0x40 mm/util.c:647
 netdev_freemem+0x3f/0x60 net/core/dev.c:10481
 netdev_release+0x7f/0xb0 net/core/net-sysfs.c:1886
 device_release+0x96/0x1c0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:713 [inline]
 kobject_release lib/kobject.c:744 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x18a/0x270 lib/kobject.c:761
 netdev_run_todo+0xb99/0xd20 net/core/dev.c:10352
 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:112
 default_device_exit_batch+0x335/0x390 net/core/dev.c:11288
 ops_exit_list net/core/net_namespace.c:190 [inline]
 cleanup_net+0x5fb/0xb70 net/core/net_namespace.c:609
 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301
 worker_thread+0xa6a/0x13b0 kernel/workqueue.c:2447
 kthread+0x346/0x3d0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

The buggy address belongs to the object at ffff8881017a2000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 256 bytes inside of
 4096-byte region [ffff8881017a2000, ffff8881017a3000)
The buggy address belongs to the page:
page:ffffea000405e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1017a0
head:ffffea000405e800 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042c00
raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 2133736420, free_ts 0
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x179/0x180 mm/page_alloc.c:2462
 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5357
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1808 [inline]
 new_slab+0x84/0x3f0 mm/slub.c:1869
 new_slab_objects mm/slub.c:2627 [inline]
 ___slab_alloc+0x2a6/0x450 mm/slub.c:2791
 __slab_alloc+0x63/0xa0 mm/slub.c:2831
 slab_alloc_node mm/slub.c:2913 [inline]
 slab_alloc mm/slub.c:2955 [inline]
 kmem_cache_alloc_trace+0x1b3/0x2e0 mm/slub.c:2972
 kmalloc include/linux/slab.h:552 [inline]
 kzalloc include/linux/slab.h:664 [inline]
 kobject_uevent_env+0x272/0x700 lib/kobject_uevent.c:539
 kobject_uevent+0x1d/0x30 lib/kobject_uevent.c:657
 device_del+0xd5f/0xed0 drivers/base/core.c:3462
 serdev_controller_add_platform+0x464/0x710 drivers/tty/serdev/core.c:823
 serdev_tty_port_register+0x21c/0x440 drivers/tty/serdev/serdev-ttyport.c:317
 tty_port_register_device_attr_serdev+0xd2/0x140 drivers/tty/tty_port.c:162
 uart_add_one_port+0xba9/0x1a50 drivers/tty/serial/serial_core.c:3021
 serial8250_register_8250_port+0x138a/0x1aa0 drivers/tty/serial/8250/8250_core.c:1097
 serial_pnp_probe+0x4d5/0x6d0 drivers/tty/serial/8250/8250_pnp.c:480
page_owner free stack trace missing

Memory state around the buggy address:
 ffff8881017a2000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881017a2080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8881017a2100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8881017a2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881017a2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/19 10:35 android13-5.10-lts d76d4cd0623a ed3e87f7 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/06/19 01:45 android13-5.10-lts d76d4cd0623a ed3e87f7 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/06/18 06:40 android13-5.10-lts d76d4cd0623a e77fae15 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/06/17 18:24 android13-5.10-lts d76d4cd0623a cfebc887 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/20 13:15 android13-5.10-lts ba8b8b193394 2a20f901 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/20 09:44 android13-5.10-lts ba8b8b193394 2a20f901 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/20 03:10 android13-5.10-lts ba8b8b193394 2a20f901 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 07:41 android13-5.10-lts ba8b8b193394 2a20f901 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/20 11:56 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/20 01:52 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/06/13 14:06 android13-5.10-lts d76d4cd0623a 98683f8f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/06/12 13:54 android13-5.10-lts d76d4cd0623a 98683f8f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/06/03 00:22 android13-5.10-lts cf6ed0f1511d a30356b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/05/27 20:53 android13-5.10-lts cf6ed0f1511d 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/05/25 04:50 android13-5.10-lts 7e2543346ff7 ed351ea7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/05/24 10:02 android13-5.10-lts 7e2543346ff7 ed351ea7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/05/04 20:29 android13-5.10-lts ab07aeb2c93d b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 02:55 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 02:55 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 02:54 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 02:54 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 02:54 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 02:53 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 02:53 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
2025/04/19 02:53 android13-5.10-lts ba8b8b193394 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in vlan_dev_get_iflink
* Struck through repros no longer work on HEAD.