Hello,
syzbot found the following issue on:
HEAD commit: 7dc732d24ff7 Linux 6.1.123
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1225faf8580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=da1827eaa51b65c3
dashboard link:
https://syzkaller.appspot.com/bug?extid=6123f0423e02aee4ddcf
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=153bf6df980000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=124ebd0f980000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/b77a36eba7b4/disk-7dc732d2.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/f5334562da28/vmlinux-7dc732d2.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/f0a16f9a500c/Image-7dc732d2.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+6123f0...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in nr_dec_obs net/netrom/nr_route.c:471 [inline]
BUG: KASAN: use-after-free in nr_rt_ioctl+0x4c0/0xd24 net/netrom/nr_route.c:692
Read of size 2 at addr ffff0000d155bc32 by task syz-executor400/4403
CPU: 1 PID: 4403 Comm: syz-executor400 Not tainted 6.1.123-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0x174/0x4c0 mm/kasan/report.c:427
kasan_report+0xd4/0x130 mm/kasan/report.c:531
__asan_report_load2_noabort+0x2c/0x38 mm/kasan/report_generic.c:349
nr_dec_obs net/netrom/nr_route.c:471 [inline]
nr_rt_ioctl+0x4c0/0xd24 net/netrom/nr_route.c:692
nr_ioctl+0x14c/0x45c net/netrom/af_netrom.c:1254
sock_do_ioctl+0x134/0x2dc net/socket.c:1204
sock_ioctl+0x4ec/0x858 net/socket.c:1321
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Allocated by task 4403:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:211 [inline]
kmalloc_trace+0x7c/0x94 mm/slab_common.c:1031
kmalloc include/linux/slab.h:563 [inline]
nr_add_node+0x778/0x1ed8 net/netrom/nr_route.c:146
nr_rt_ioctl+0xacc/0xd24 net/netrom/nr_route.c:651
nr_ioctl+0x14c/0x45c net/netrom/af_netrom.c:1254
sock_do_ioctl+0x134/0x2dc net/socket.c:1204
sock_ioctl+0x4ec/0x858 net/socket.c:1321
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Freed by task 4403:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:244
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0x2c0/0x4b4 mm/slub.c:3674
kfree+0xcc/0x1b8 mm/slab_common.c:988
nr_neigh_put+0x144/0x1cc include/net/netrom.h:143
nr_dec_obs net/netrom/nr_route.c:469 [inline]
nr_rt_ioctl+0x290/0xd24 net/netrom/nr_route.c:692
nr_ioctl+0x14c/0x45c net/netrom/af_netrom.c:1254
sock_do_ioctl+0x134/0x2dc net/socket.c:1204
sock_ioctl+0x4ec/0x858 net/socket.c:1321
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
The buggy address belongs to the object at ffff0000d155bc00
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 50 bytes inside of
128-byte region [ffff0000d155bc00, ffff0000d155bc80)
The buggy address belongs to the physical page:
page:00000000a6b83328 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11155b
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 fffffc00034a9100 dead000000000002 ffff0000c0002300
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000d155bb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff0000d155bb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000d155bc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000d155bc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000d155bd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
Unable to handle kernel paging request at virtual address e082806d60000226
KASAN: maybe wild-memory-access in range [0x0418036b00001130-0x0418036b00001137]
Mem abort info:
ESR = 0x0000000096000004
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x04: level 0 translation fault
Data abort info:
ISV = 0, ISS = 0x00000004
CM = 0, WnR = 0
[e082806d60000226] address between user and kernel address ranges
Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4403 Comm: syz-executor400 Tainted: G B 6.1.123-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __hlist_del include/linux/list.h:884 [inline]
pc : hlist_del_init include/linux/list.h:912 [inline]
pc : __nr_remove_neigh net/netrom/nr_route.c:298 [inline]
pc : nr_remove_neigh net/netrom/nr_route.c:308 [inline]
pc : nr_dec_obs net/netrom/nr_route.c:472 [inline]
pc : nr_rt_ioctl+0x364/0xd24 net/netrom/nr_route.c:692
lr : __hlist_del include/linux/list.h:881 [inline]
lr : hlist_del_init include/linux/list.h:912 [inline]
lr : __nr_remove_neigh net/netrom/nr_route.c:298 [inline]
lr : nr_remove_neigh net/netrom/nr_route.c:308 [inline]
lr : nr_dec_obs net/netrom/nr_route.c:472 [inline]
lr : nr_rt_ioctl+0x35c/0xd24 net/netrom/nr_route.c:692
sp : ffff800021527880
x29: ffff800021527a00 x28: ffff0000d06df81f x27: ffff0000d155bc00
x26: 0000000000000000 x25: 1fffe0001a0dbf03 x24: ffff0000d06df830
x23: 0418036b00001133 x22: 0000000000000000 x21: ffff0000d06df828
x20: ffff0000d06df821 x19: dfff800000000000 x18: ffff800021527160
x17: 0000000000000000 x16: ffff800008975484 x15: 0000000000000000
x14: 00000000ffffffff x13: 0000000000000001 x12: ffff7000042a4ef8
x11: 1ffff000042a4ef8 x10: 0000000000000004 x9 : ffff80001cca89d0
x8 : 0083006d60000226 x7 : 0000000000000001 x6 : ffff800011475434
x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800011475468
x2 : 0000000000000000 x1 : 0000000000000008 x0 : 0000000000000000
Call trace:
__hlist_del include/linux/list.h:881 [inline]
hlist_del_init include/linux/list.h:912 [inline]
__nr_remove_neigh net/netrom/nr_route.c:298 [inline]
nr_remove_neigh net/netrom/nr_route.c:308 [inline]
nr_dec_obs net/netrom/nr_route.c:472 [inline]
nr_rt_ioctl+0x364/0xd24 net/netrom/nr_route.c:692
nr_ioctl+0x14c/0x45c net/netrom/af_netrom.c:1254
sock_do_ioctl+0x134/0x2dc net/socket.c:1204
sock_ioctl+0x4ec/0x858 net/socket.c:1321
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Code: aa1b03e0 97aabd13 d343fee8 f940037a (38736908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: aa1b03e0 mov x0, x27
4: 97aabd13 bl 0xfffffffffeaaf450
8: d343fee8 lsr x8, x23, #3
c: f940037a ldr x26, [x27]
* 10: 38736908 ldrb w8, [x8, x19] <-- trapping instruction
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup