syzbot


KASAN: use-after-free Read in __dev_queue_xmit

Status: upstream: reported C repro on 2022/02/10 06:42
Reported-by: syzbot+5e3e9494824ed3ed35c8@syzkaller.appspotmail.com
First crash: 966d, last: 755d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (10)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 KASAN: use-after-free Read in __dev_queue_xmit C 46 1779d 2001d 0/3 public: reported C repro on 2019/04/13 00:00
upstream KASAN: use-after-free Read in __dev_queue_xmit (4) block 1 1531d 1531d 0/28 auto-closed as invalid on 2020/10/23 09:56
upstream KASAN: use-after-free Read in __dev_queue_xmit (5) block C unreliable error 49 216d 1095d 0/28 upstream: reported C repro on 2021/10/04 21:37
upstream KASAN: use-after-free Read in __dev_queue_xmit (2) net C 2 2328d 2328d 5/28 fixed on 2018/06/07 13:52
upstream KASAN: use-after-free Read in __dev_queue_xmit (3) net 11 2194d 2198d 11/28 fixed on 2018/11/12 21:25
linux-6.1 KASAN: use-after-free Read in __dev_queue_xmit origin:upstream C error 2 160d 523d 0/3 upstream: reported C repro on 2023/04/29 13:33
linux-5.15 KASAN: use-after-free Read in __dev_queue_xmit origin:upstream missing-backport C error 3 244d 494d 0/3 upstream: reported C repro on 2023/05/28 17:42
linux-4.19 KASAN: use-after-free Read in __dev_queue_xmit C error 15 581d 1253d 0/1 upstream: reported C repro on 2021/04/30 04:08
upstream KASAN: use-after-free Read in __dev_queue_xmit net C 10 2346d 2465d 5/28 fixed on 2018/05/09 07:47
upstream BUG: unable to handle kernel paging request in __dev_queue_xmit block 1 1261d 1252d 0/28 auto-closed as invalid on 2021/06/21 04:04
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2022/10/13 02:23 0m bisect fix linux-4.14.y error job log
2022/09/10 00:27 23m bisect fix linux-4.14.y OK (0) job log log
2022/08/10 21:57 30m bisect fix linux-4.14.y OK (0) job log log
2022/07/11 21:37 19m bisect fix linux-4.14.y OK (0) job log log
2022/06/11 21:13 21m bisect fix linux-4.14.y OK (0) job log log
2022/05/12 20:48 24m bisect fix linux-4.14.y OK (0) job log log
2022/04/12 20:22 26m bisect fix linux-4.14.y OK (0) job log log
2022/03/13 19:51 30m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
device bridge1606 entered promiscuous mode
==================================================================
device bridge1607 entered promiscuous mode
BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:185 [inline]
BUG: KASAN: use-after-free in skb_update_prio net/core/dev.c:3251 [inline]
BUG: KASAN: use-after-free in __dev_queue_xmit+0x21b7/0x2480 net/core/dev.c:3463
Read of size 8 at addr ffff88804633ccf0 by task aoe_tx0/3072

CPU: 1 PID: 3072 Comm: aoe_tx0 Not tainted 4.14.265-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 __read_once_size include/linux/compiler.h:185 [inline]
 skb_update_prio net/core/dev.c:3251 [inline]
 __dev_queue_xmit+0x21b7/0x2480 net/core/dev.c:3463
 tx+0x68/0xa0 drivers/block/aoe/aoenet.c:63
 kthread+0x1b9/0x350 drivers/block/aoe/aoecmd.c:1259
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Allocated by task 1463:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 __do_kmalloc_node mm/slab.c:3682 [inline]
 __kmalloc_node+0x4c/0x70 mm/slab.c:3689
 kmalloc_node include/linux/slab.h:530 [inline]
 kvmalloc_node+0x46/0xd0 mm/util.c:397
 kvmalloc include/linux/mm.h:531 [inline]
 kvzalloc include/linux/mm.h:539 [inline]
 alloc_netdev_mqs+0x76/0xb70 net/core/dev.c:8112
 rtnl_create_link+0x1ab/0x890 net/core/rtnetlink.c:2460
 rtnl_newlink+0xe7a/0x1830 net/core/rtnetlink.c:2720
 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322
 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2446
 netlink_unicast_kernel net/netlink/af_netlink.c:1294 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1320
 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1891
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 1463:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kfree+0xc9/0x250 mm/slab.c:3815
 kvfree+0x45/0x50 mm/util.c:416
 device_release+0x15f/0x1a0 drivers/base/core.c:848
 kobject_cleanup lib/kobject.c:646 [inline]
 kobject_release lib/kobject.c:675 [inline]
 kref_put include/linux/kref.h:70 [inline]
 kobject_put+0x251/0x550 lib/kobject.c:692
 netdev_run_todo+0x747/0xad0 net/core/dev.c:7969
 rtnl_unlock net/core/rtnetlink.c:106 [inline]
 rtnetlink_rcv_msg+0x3cb/0xb10 net/core/rtnetlink.c:4324
 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2446
 netlink_unicast_kernel net/netlink/af_netlink.c:1294 [inline]
 netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1320
 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1891
 sock_sendmsg_nosec net/socket.c:646 [inline]
 sock_sendmsg+0xb5/0x100 net/socket.c:656
 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062
 __sys_sendmsg+0xa3/0x120 net/socket.c:2096
 SYSC_sendmsg net/socket.c:2107 [inline]
 SyS_sendmsg+0x27/0x40 net/socket.c:2103
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff88804633c240
 which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 2736 bytes inside of
 4096-byte region [ffff88804633c240, ffff88804633d240)
The buggy address belongs to the page:
page:ffffea000118cf00 count:1 mapcount:0 mapping:ffff88804633c240 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff88804633c240 0000000000000000 0000000100000001
raw: ffffea00012376a0 ffffea000118cfa0 ffff88813fe74dc0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88804633cb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88804633cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88804633cc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                             ^
 ffff88804633cd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88804633cd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/10 06:41 linux-4.14.y 21ad423fe521 0b33604d .config console log report syz C ci2-linux-4-14 KASAN: use-after-free Read in __dev_queue_xmit
* Struck through repros no longer work on HEAD.