syzbot


KASAN: slab-out-of-bounds Read in lock_sock_nested

Status: auto-obsoleted due to no activity on 2023/01/05 15:59
Reported-by: syzbot+7c5432d2d77d7eb25684@syzkaller.appspotmail.com
First crash: 1273d, last: 609d
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: use-after-free Read in lock_sock_nested C inconclusive 331 475d 1841d 0/1 upstream: reported C repro on 2019/04/24 06:28
upstream KASAN: use-after-free Read in lock_sock_nested hams C inconclusive done 1856 344d 1953d 0/26 auto-obsoleted due to no activity on 2023/08/23 09:06
upstream KASAN: slab-out-of-bounds Read in lock_sock_nested bluetooth syz unreliable done 23 926d 1366d 0/26 auto-obsoleted due to no activity on 2022/09/29 10:19
upstream BUG: unable to handle kernel paging request in lock_sock_nested bluetooth 43 932d 1372d 0/26 auto-closed as invalid on 2022/02/16 22:16
linux-4.19 KASAN: wild-memory-access Write in lock_sock_nested 2 1196d 1265d 0/1 auto-closed as invalid on 2021/05/28 14:35
linux-4.14 general protection fault in lock_sock_nested 4 1097d 1315d 0/1 auto-closed as invalid on 2021/09/04 19:35
linux-4.19 KASAN: use-after-free Read in lock_sock_nested C 471 434d 1748d 0/1 upstream: reported C repro on 2019/07/26 21:27
upstream general protection fault in lock_sock_nested bluetooth C done done 115 1d17h 240d 0/26 upstream: reported C repro on 2023/09/11 07:52
linux-5.15 general protection fault in lock_sock_nested origin:upstream syz 20 56m 34d 0/3 upstream: reported syz repro on 2024/04/04 13:25
linux-4.14 BUG: unable to handle kernel paging request in lock_sock_nested 4 1090d 1209d 0/1 auto-closed as invalid on 2021/09/11 11:51
linux-6.1 general protection fault in lock_sock_nested 1 24d 24d 0/3 upstream: reported on 2024/04/14 08:46

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295
Read of size 8 at addr ffff8880ab5d02e0 by task syz-executor.3/8141

CPU: 0 PID: 8141 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/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_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
 _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:168
 spin_lock_bh include/linux/spinlock.h:334 [inline]
 lock_sock_nested+0x3b/0x110 net/core/sock.c:2884
 l2cap_sock_teardown_cb+0xa0/0x6d0 net/bluetooth/l2cap_sock.c:1348
 l2cap_chan_del+0xbc/0xa50 net/bluetooth/l2cap_core.c:603
 l2cap_conn_del+0x3a6/0x6e0 net/bluetooth/l2cap_core.c:1733
 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7445 [inline]
 l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:7438
 hci_disconn_cfm include/net/bluetooth/hci_core.h:1263 [inline]
 hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512
 hci_dev_do_close+0x6bc/0x1020 net/bluetooth/hci_core.c:1687
 hci_unregister_dev+0x14f/0x460 net/bluetooth/hci_core.c:3288
 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354
 __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
 __do_sys_exit_group kernel/exit.c:978 [inline]
 __se_sys_exit_group kernel/exit.c:976 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:976
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f1a0c0d8279
Code: Bad RIP value.
RSP: 002b:00007ffe80a7d668 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000064 RCX: 00007f1a0c0d8279
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 00007f1a0c131340 R08: 000000000000000c R09: 0000555555a433b8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000016
R13: 00007ffe80a7e940 R14: 0000555555a433b8 R15: 00007ffe80a7fa40

Allocated by task 4682:
 kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
 getname_flags+0xce/0x590 fs/namei.c:140
 do_sys_open+0x26c/0x520 fs/open.c:1079
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 4682:
 __cache_free mm/slab.c:3503 [inline]
 kmem_cache_free+0x7f/0x260 mm/slab.c:3765
 putname+0xe1/0x120 fs/namei.c:261
 do_sys_open+0x2ba/0x520 fs/open.c:1094
 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 ffff8880ab5d0980
 which belongs to the cache names_cache of size 4096
audit: type=1804 audit(1661044321.142:24227): pid=5104 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir15314676/syzkaller.oSlfvA/989/cgroup.controllers" dev="sda1" ino=14228 res=1
The buggy address is located 1696 bytes to the left of
 4096-byte region [ffff8880ab5d0980, ffff8880ab5d1980)
The buggy address belongs to the page:
page:ffffea0002ad7400 count:1 mapcount:0 mapping:ffff88823b843380 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002964808 ffffea0001476908 ffff88823b843380
raw: 0000000000000000 ffff8880ab5d0980 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880ab5d0180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880ab5d0200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880ab5d0280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                       ^
 ffff8880ab5d0300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880ab5d0380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/21 01:12 linux-4.19.y 3f8a27f9e27b 26a13b38 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in lock_sock_nested
2022/02/24 05:33 linux-4.19.y 3f8a27f9e27b 6e821dbf .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in lock_sock_nested
2021/08/01 19:02 linux-4.19.y 53bd76690e27 6c236867 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in lock_sock_nested
2021/04/27 00:24 linux-4.19.y 2965db2e004c 8ee2dea6 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in lock_sock_nested
2021/04/21 19:54 linux-4.19.y 2965db2e004c 95777977 .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in lock_sock_nested
2021/02/12 20:26 linux-4.19.y 811218eceeaa 98682e5e .config console log report info ci2-linux-4-19 KASAN: slab-out-of-bounds Read in lock_sock_nested
2022/09/07 15:59 linux-4.19.y 3f8a27f9e27b c5b7bc57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 BUG: unable to handle kernel paging request in lock_sock_nested
2022/08/11 17:30 linux-4.19.y 3f8a27f9e27b 787ed7e0 .config console log report info ci2-linux-4-19 BUG: unable to handle kernel paging request in lock_sock_nested
2022/06/03 20:24 linux-4.19.y 3f8a27f9e27b eee80d3c .config console log report info ci2-linux-4-19 KASAN: global-out-of-bounds Write in lock_sock_nested
2021/11/28 04:33 linux-4.19.y 3f8a27f9e27b 63eeac02 .config console log report info ci2-linux-4-19 BUG: unable to handle kernel paging request in lock_sock_nested
2021/08/24 01:40 linux-4.19.y 59456c9cc40c b599f2fc .config console log report info ci2-linux-4-19 BUG: unable to handle kernel paging request in lock_sock_nested
2021/05/14 18:00 linux-4.19.y 3c8c23092588 8bdd5343 .config console log report info ci2-linux-4-19 BUG: unable to handle kernel paging request in lock_sock_nested
2021/02/25 20:26 linux-4.19.y 2d19be4653f5 76f7fc95 .config console log report info ci2-linux-4-19 KASAN: global-out-of-bounds Write in lock_sock_nested
2020/11/12 16:52 linux-4.19.y 31acccdc8774 77a55c8e .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.