syzbot


KASAN: use-after-free Read in nr_release

Status: upstream: reported C repro on 2019/08/10 01:07
Reported-by: syzbot+33090272a4173513d932@syzkaller.appspotmail.com
First crash: 1960d, last: 657d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in nr_release hams C done 25 1944d 2023d 12/28 fixed on 2019/08/27 17:15
linux-4.14 KASAN: use-after-free Read in nr_release C 117 658d 1957d 0/1 upstream: reported C repro on 2019/08/13 12:20
upstream KASAN: use-after-free Read in nr_release (2) hams syz error error 59 1851d 1941d 0/28 auto-obsoleted due to no activity on 2023/04/12 23:03
upstream KASAN: use-after-free Write in nr_release hams C done error 1784 575d 1849d 22/28 fixed on 2023/06/08 14:41
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2021/07/05 13:34 41m bisect fix linux-4.19.y OK (0) job log log
2021/02/19 10:18 39m (2) bisect fix linux-4.19.y OK (0) job log log
2021/01/20 09:22 39m bisect fix linux-4.19.y OK (0) job log log
2020/12/21 08:42 40m bisect fix linux-4.19.y OK (0) job log log
2020/09/21 08:24 39m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21
IPVS: ftp: loaded support on port[0] = 21
==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295
Read of size 8 at addr ffff8880b13703b8 by task syz-executor111/9542

CPU: 1 PID: 9542 Comm: syz-executor111 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/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_load8_noabort+0x88/0x90 mm/kasan/report.c:433
 __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline]
 _raw_write_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:312
 sock_orphan include/net/sock.h:1801 [inline]
 nr_release+0x5d/0x360 net/netrom/af_netrom.c:524
 __sock_release+0xcd/0x2a0 net/socket.c:599
 sock_close+0x15/0x20 net/socket.c:1214
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xbf3/0x2be0 kernel/exit.c:870
 do_group_exit+0x125/0x310 kernel/exit.c:967
 get_signal+0x3f2/0x1f70 kernel/signal.c:2589
 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799
 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fe6a0e758e9
Code: Bad RIP value.
RSP: 002b:00007ffd6595bd88 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: 0000000000000116 RBX: 0000000000000003 RCX: 00007fe6a0e758e9
RDX: 0000000000000318 RSI: 00000000200bd000 RDI: 0000000000000006
RBP: 0000000000000003 R08: 000000090000000d R09: 000000090000000d
R10: 0000000000000000 R11: 0000000000000246 R12: 0000555555b3e2c0
R13: 0000000000000011 R14: 000000000000b391 R15: 00007ffd6595bd94

Allocated by task 9542:
 __do_kmalloc mm/slab.c:3727 [inline]
 __kmalloc+0x15a/0x3c0 mm/slab.c:3736
 kmalloc include/linux/slab.h:520 [inline]
 sk_prot_alloc+0x1e2/0x2d0 net/core/sock.c:1483
 sk_alloc+0x36/0xec0 net/core/sock.c:1537
 nr_create+0xb2/0x5d0 net/netrom/af_netrom.c:436
 __sock_create+0x3d8/0x740 net/socket.c:1365
 sock_create net/socket.c:1416 [inline]
 __sys_socket+0xef/0x200 net/socket.c:1458
 __do_sys_socket net/socket.c:1467 [inline]
 __se_sys_socket net/socket.c:1465 [inline]
 __x64_sys_socket+0x6f/0xb0 net/socket.c:1465
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 9542:
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 mm/slab.c:3822
 sk_prot_free net/core/sock.c:1520 [inline]
 __sk_destruct+0x684/0x8a0 net/core/sock.c:1602
 sk_destruct net/core/sock.c:1617 [inline]
 __sk_free+0x165/0x3b0 net/core/sock.c:1628
 sk_free+0x3b/0x50 net/core/sock.c:1639
 sock_put include/net/sock.h:1713 [inline]
 nr_release+0x2dc/0x360 net/netrom/af_netrom.c:557
 __sock_release+0xcd/0x2a0 net/socket.c:599
 sock_close+0x15/0x20 net/socket.c:1214
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0xbf3/0x2be0 kernel/exit.c:870
 do_group_exit+0x125/0x310 kernel/exit.c:967
 get_signal+0x3f2/0x1f70 kernel/signal.c:2589
 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799
 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880b1370040
 which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 888 bytes inside of
 2048-byte region [ffff8880b1370040, ffff8880b1370840)
The buggy address belongs to the page:
page:ffffea0002c4dc00 count:1 mapcount:0 mapping:ffff88813bff0c40 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002c4d788 ffffea0002c33288 ffff88813bff0c40
raw: 0000000000000000 ffff8880b1370040 0000000100000003 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b1370280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b1370300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880b1370380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                        ^
 ffff8880b1370400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b1370480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (327):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/06 07:22 linux-4.19.y 3f8a27f9e27b 9dcd38fc .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/06/19 14:10 linux-4.19.y 3f8a27f9e27b 8f633d84 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/06/19 13:54 linux-4.19.y 3f8a27f9e27b 8f633d84 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/06/08 13:35 linux-4.19.y 3f8a27f9e27b b2706118 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/06/03 04:43 linux-4.19.y 3f8a27f9e27b 02dddea8 .config console log report syz C ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2019/08/30 11:26 linux-4.19.y 97ab07e11fbf cd626f3b .config console log report syz C ci2-linux-4-19
2019/08/20 17:52 linux-4.19.y a5aa80588fcd cfc9868f .config console log report syz C ci2-linux-4-19
2022/10/01 00:47 linux-4.19.y 3f8a27f9e27b feb56351 .config console log report syz [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2020/02/15 13:19 linux-4.19.y 9b15f7fae677 5d7b90f1 .config console log report syz ci2-linux-4-19
2019/10/02 03:20 linux-4.19.y 555161ee1b7a b7a87a83 .config console log report syz ci2-linux-4-19
2023/03/04 12:43 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/03/03 03:13 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/27 05:52 linux-4.19.y 3f8a27f9e27b ee50e71c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/25 02:10 linux-4.19.y 3f8a27f9e27b ee50e71c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/23 10:22 linux-4.19.y 3f8a27f9e27b 9e2ebb3c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/21 20:15 linux-4.19.y 3f8a27f9e27b 42a4d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/21 08:51 linux-4.19.y 3f8a27f9e27b f949448d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/21 08:39 linux-4.19.y 3f8a27f9e27b f949448d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/20 13:20 linux-4.19.y 3f8a27f9e27b bcdf85f8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/19 00:21 linux-4.19.y 3f8a27f9e27b bcdf85f8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/18 13:13 linux-4.19.y 3f8a27f9e27b d02e9a70 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/15 11:38 linux-4.19.y 3f8a27f9e27b e62ba3c1 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/11 21:54 linux-4.19.y 3f8a27f9e27b 93e26d60 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/10 12:40 linux-4.19.y 3f8a27f9e27b e29a17f5 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/09 04:06 linux-4.19.y 3f8a27f9e27b 14a312c8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/08 15:47 linux-4.19.y 3f8a27f9e27b fc9c934e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/04 15:13 linux-4.19.y 3f8a27f9e27b be607b78 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/03 15:29 linux-4.19.y 3f8a27f9e27b 1b2f701a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/03 14:27 linux-4.19.y 3f8a27f9e27b 1b2f701a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/02/02 16:08 linux-4.19.y 3f8a27f9e27b 16d19e30 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/31 01:03 linux-4.19.y 3f8a27f9e27b b68fb8d6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/30 11:32 linux-4.19.y 3f8a27f9e27b b68fb8d6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/29 09:59 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/27 04:41 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/25 20:29 linux-4.19.y 3f8a27f9e27b 9dfcf09c .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/20 11:59 linux-4.19.y 3f8a27f9e27b dd15ff29 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/19 07:57 linux-4.19.y 3f8a27f9e27b 66fca3ae .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/16 06:11 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/11 13:51 linux-4.19.y 3f8a27f9e27b 96166539 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/09 23:44 linux-4.19.y 3f8a27f9e27b 48bc529a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/08 21:26 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/05 22:14 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/05 20:52 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/05 02:51 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2023/01/02 19:37 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/24 15:12 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/20 00:56 linux-4.19.y 3f8a27f9e27b c52b2efb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/19 05:27 linux-4.19.y 3f8a27f9e27b 05494336 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/16 15:48 linux-4.19.y 3f8a27f9e27b 05494336 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/15 11:41 linux-4.19.y 3f8a27f9e27b 6f9c033e .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/12 23:52 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/09 15:16 linux-4.19.y 3f8a27f9e27b 67be1ae7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/08 18:06 linux-4.19.y 3f8a27f9e27b 1034e5fa .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/07 19:55 linux-4.19.y 3f8a27f9e27b d88f3abb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/06 07:25 linux-4.19.y 3f8a27f9e27b 045cbb84 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/05 16:13 linux-4.19.y 3f8a27f9e27b 045cbb84 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/12/03 08:17 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2022/11/29 13:24 linux-4.19.y 3f8a27f9e27b ca9683b8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in nr_release
2020/11/21 08:29 linux-4.19.y 2c746135a12e 68068804 .config console log report info ci2-linux-4-19
2019/08/10 00:06 linux-4.19.y 893af1c79e42 aff9e255 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.