syzbot


KASAN: use-after-free Read in macvlan_dev_get_iflink

Status: upstream: reported C repro on 2020/03/06 01:52
Reported-by: syzbot+714f24a8e74aafd52bc0@syzkaller.appspotmail.com
First crash: 1760d, last: 714d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: use-after-free Read in macvlan_dev_get_iflink C error 75 836d 1760d 0/1 upstream: reported C repro on 2020/03/06 01:40
upstream KASAN: use-after-free Read in macvlan_dev_get_iflink net C done inconclusive 125 1012d 1646d 0/28 auto-obsoleted due to no activity on 2023/04/18 11:01
Fix bisection attempts (11)
Created Duration User Patch Repo Result
2021/11/05 21:41 18m bisect fix linux-4.19.y error job log
2021/10/06 20:38 30m bisect fix linux-4.19.y OK (0) job log log
2021/09/06 20:04 33m bisect fix linux-4.19.y OK (0) job log log
2021/08/07 19:33 31m bisect fix linux-4.19.y OK (0) job log log
2021/06/30 00:16 26m bisect fix linux-4.19.y OK (0) job log log
2021/05/30 23:41 35m bisect fix linux-4.19.y OK (0) job log log
2021/04/05 01:41 35m bisect fix linux-4.19.y OK (0) job log log
2021/02/27 22:55 26m bisect fix linux-4.19.y OK (0) job log log
2021/01/28 21:12 28m bisect fix linux-4.19.y OK (0) job log log
2020/12/19 18:51 26m bisect fix linux-4.19.y OK (0) job log log
2020/11/19 18:25 25m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in macvlan_dev_get_iflink+0x5f/0x70 drivers/net/macvlan.c:1099
Read of size 4 at addr ffff8880a0758548 by task syz-executor188/11753

CPU: 0 PID: 11753 Comm: syz-executor188 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432
 macvlan_dev_get_iflink+0x5f/0x70 drivers/net/macvlan.c:1099
 dev_get_iflink+0x73/0xe0 net/core/dev.c:692
 rfc2863_policy+0x1af/0x200 net/core/link_watch.c:43
 linkwatch_do_dev+0x1d/0x110 net/core/link_watch.c:157
 linkwatch_forget_dev+0x16a/0x200 net/core/link_watch.c:223
 netdev_wait_allrefs net/core/dev.c:8892 [inline]
 netdev_run_todo+0x258/0xab0 net/core/dev.c:8988
 rtnl_unlock net/core/rtnetlink.c:117 [inline]
 rtnetlink_rcv_msg+0x460/0xb80 net/core/rtnetlink.c:4783
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
 __sys_sendmsg net/socket.c:2265 [inline]
 __do_sys_sendmsg net/socket.c:2274 [inline]
 __se_sys_sendmsg net/socket.c:2272 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f4e6087ad69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f4e6080b308 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f4e60902438 RCX: 00007f4e6087ad69
RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000006
RBP: 00007f4e60902430 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4e6090243c
R13: 00007f4e608d0074 R14: 00f0ffffffffffff R15: 0000000000022000

Allocated by task 11719:
 __do_kmalloc_node mm/slab.c:3689 [inline]
 __kmalloc_node+0x4c/0x70 mm/slab.c:3696
 kmalloc_node include/linux/slab.h:557 [inline]
 kvmalloc_node+0x61/0xf0 mm/util.c:423
 kvmalloc include/linux/mm.h:577 [inline]
 kvzalloc include/linux/mm.h:585 [inline]
 alloc_netdev_mqs+0x97/0xd50 net/core/dev.c:9152
 rtnl_create_link+0x1d4/0xa40 net/core/rtnetlink.c:2869
 rtnl_newlink+0xf45/0x15c0 net/core/rtnetlink.c:3131
 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
 __sys_sendmsg net/socket.c:2265 [inline]
 __do_sys_sendmsg net/socket.c:2274 [inline]
 __se_sys_sendmsg net/socket.c:2272 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 11719:
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 mm/slab.c:3822
 kvfree+0x59/0x60 mm/util.c:452
 device_release+0x76/0x210 drivers/base/core.c:1076
 kobject_cleanup lib/kobject.c:662 [inline]
 kobject_release lib/kobject.c:691 [inline]
 kref_put include/linux/kref.h:70 [inline]
 kobject_put+0x28b/0x5d0 lib/kobject.c:708
 netdev_run_todo+0x77f/0xab0 net/core/dev.c:9011
 rtnl_unlock net/core/rtnetlink.c:117 [inline]
 rtnetlink_rcv_msg+0x460/0xb80 net/core/rtnetlink.c:4783
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227
 __sys_sendmsg net/socket.c:2265 [inline]
 __do_sys_sendmsg net/socket.c:2274 [inline]
 __se_sys_sendmsg net/socket.c:2272 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880a0758440
 which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 264 bytes inside of
 4096-byte region [ffff8880a0758440, ffff8880a0759440)
The buggy address belongs to the page:
page:ffffea000281d600 count:1 mapcount:0 mapping:ffff88813bff0dc0 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea00027e1908 ffffea0002d35d88 ffff88813bff0dc0
raw: 0000000000000000 ffff8880a0758440 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a0758400: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
 ffff8880a0758480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880a0758500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                              ^
 ffff8880a0758580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880a0758600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (83):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/05 14:40 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/12/23 18:11 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/09/13 01:33 linux-4.19.y 3f8a27f9e27b f371ed7e .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/06/04 22:19 linux-4.19.y 3f8a27f9e27b c8857892 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2020/03/06 17:32 linux-4.19.y 7472c4028e23 7fb694ef .config console log report syz C ci2-linux-4-19
2020/03/06 03:20 linux-4.19.y 7472c4028e23 b655d91b .config console log report syz C ci2-linux-4-19
2023/01/15 19:17 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2023/01/04 17:47 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/12/23 11:46 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/11/29 13:57 linux-4.19.y 3f8a27f9e27b ca9683b8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/11/11 18:30 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/10/27 05:45 linux-4.19.y 3f8a27f9e27b 86777b7f .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/10/23 06:35 linux-4.19.y 3f8a27f9e27b c0b80a55 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/10/16 06:40 linux-4.19.y 3f8a27f9e27b 67cb024c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/10/14 00:27 linux-4.19.y 3f8a27f9e27b 4954e4b2 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/09/27 11:32 linux-4.19.y 3f8a27f9e27b 10323ddf .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/09/22 09:33 linux-4.19.y 3f8a27f9e27b 60af5050 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/09/12 23:39 linux-4.19.y 3f8a27f9e27b f371ed7e .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/09/10 09:59 linux-4.19.y 3f8a27f9e27b 356d8217 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/09/04 10:03 linux-4.19.y 3f8a27f9e27b 28811d0a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/09/01 06:17 linux-4.19.y 3f8a27f9e27b b01ec571 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/08/16 11:06 linux-4.19.y 3f8a27f9e27b 7a7cb304 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/08/15 22:47 linux-4.19.y 3f8a27f9e27b 8dfcaa3d .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/08/10 22:46 linux-4.19.y 3f8a27f9e27b a6201f11 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/08/08 08:50 linux-4.19.y 3f8a27f9e27b 88e3a122 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/07/23 17:45 linux-4.19.y 3f8a27f9e27b 22343af4 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/07/07 16:54 linux-4.19.y 3f8a27f9e27b bff65f44 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/06/24 23:22 linux-4.19.y 3f8a27f9e27b a371c43c .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/06/24 20:37 linux-4.19.y 3f8a27f9e27b a371c43c .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/06/07 19:59 linux-4.19.y 3f8a27f9e27b b2706118 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/06/04 20:08 linux-4.19.y 3f8a27f9e27b c8857892 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/01/12 09:41 linux-4.19.y 3f8a27f9e27b 44d1319a .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2022/01/08 23:10 linux-4.19.y 3f8a27f9e27b 2ca0d385 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2021/07/08 19:33 linux-4.19.y 9f84340f012e 1b20171a .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2021/04/30 20:26 linux-4.19.y 97a8651cadce 77e2b668 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2021/04/21 06:25 linux-4.19.y 2965db2e004c c0ced557 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2021/04/21 00:34 linux-4.19.y 2965db2e004c c0ced557 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2021/03/06 01:13 linux-4.19.y dfb571610ba3 4a024a9b .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in macvlan_dev_get_iflink
2020/12/29 21:12 linux-4.19.y 13d2ce42de8c 80910769 .config console log report info ci2-linux-4-19
2020/10/20 18:18 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/14 07:29 linux-4.19.y a1b977b49b66 fc7735a2 .config console log report info ci2-linux-4-19
2020/10/12 20:09 linux-4.19.y a1b977b49b66 d32b0bbf .config console log report info ci2-linux-4-19
2020/10/10 18:09 linux-4.19.y a1b977b49b66 b74c49a6 .config console log report info ci2-linux-4-19
2020/10/09 15:26 linux-4.19.y a1b977b49b66 fa79ed2a .config console log report info ci2-linux-4-19
2020/10/01 19:02 linux-4.19.y b09c34517e1a 4103fce0 .config console log report info ci2-linux-4-19
2020/09/10 16:34 linux-4.19.y 67957f12548c ac7ca78e .config console log report ci2-linux-4-19
2020/09/09 12:08 linux-4.19.y c37da90efff5 0ea7a887 .config console log report ci2-linux-4-19
2020/08/21 16:27 linux-4.19.y d18b78abc0c6 1d75fe45 .config console log report ci2-linux-4-19
2020/08/21 03:34 linux-4.19.y a834132bd465 70160577 .config console log report ci2-linux-4-19
2020/05/26 12:10 linux-4.19.y 1bab61d3e8cd 8ca3b7d2 .config console log report ci2-linux-4-19
2020/05/26 03:59 linux-4.19.y 1bab61d3e8cd 8ca3b7d2 .config console log report ci2-linux-4-19
2020/05/24 20:51 linux-4.19.y 1bab61d3e8cd ce7ca010 .config console log report ci2-linux-4-19
2020/05/21 09:59 linux-4.19.y 1bab61d3e8cd 4afdfa20 .config console log report ci2-linux-4-19
2020/05/19 02:48 linux-4.19.y 258f0cf7ac3b 684d3606 .config console log report ci2-linux-4-19
2020/05/18 19:27 linux-4.19.y 258f0cf7ac3b 24d91142 .config console log report ci2-linux-4-19
2020/05/13 12:09 linux-4.19.y 033c4ea49a4b 9a6d42fb .config console log report ci2-linux-4-19
2020/05/02 21:28 linux-4.19.y fdc072324f3c 58da4c35 .config console log report ci2-linux-4-19
2020/05/02 13:24 linux-4.19.y 765675379b62 58da4c35 .config console log report ci2-linux-4-19
2020/04/22 17:47 linux-4.19.y 8e2406c85187 2e44d63e .config console log report ci2-linux-4-19
2020/04/15 04:24 linux-4.19.y 6dd0e32665e5 3f3c5574 .config console log report ci2-linux-4-19
2020/04/09 19:11 linux-4.19.y dda0e2920330 a8c6a3f8 .config console log report ci2-linux-4-19
2020/04/03 17:39 linux-4.19.y dda0e2920330 5ed396e6 .config console log report ci2-linux-4-19
2020/03/06 01:51 linux-4.19.y 7472c4028e23 b655d91b .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.