syzbot


BUG: corrupted list in __sk_destruct (2)

Status: upstream: reported syz repro on 2025/03/04 10:01
Subsystems: net ext4
[Documentation on labels]
Reported-by: syzbot+2f2bc79f24dae1dc62b6@syzkaller.appspotmail.com
First crash: 8d09h, last: 8d09h
Cause bisection: introduced by (bisect log) :
commit 5872331b3d91820e14716632ebb56b1399b34fe1
Author: Eric Sandeen <sandeen@redhat.com>
Date: Wed Jun 17 19:19:04 2020 +0000

  ext4: fix potential negative array index in do_split()

Crash: KASAN: use-after-free Write in add_dirent_to_buf (log)
Repro: syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [net?] [ext4?] BUG: corrupted list in __sk_destruct (2) 0 (2) 2025/03/06 08:20
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: corrupted list in __sk_destruct net 6 795d 850d 0/28 closed as invalid on 2023/02/13 10:50

Sample crash report:
 slab kmalloc-32 start ffff88805f791000 pointer offset 0 size 32
list_del corruption. next->prev should be ffff88802029a200, but was ff61616161616161. (next=ffff88805f791000)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:67!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 5948 Comm: syz-executor Not tainted 6.14.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:__list_del_entry_valid_or_report+0x18c/0x190 lib/list_debug.c:65
Code: fa 89 10 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 bb 0e 32 fd 49 8b 56 08 48 c7 c7 00 21 80 8c 4c 89 fe 4c 89 f1 e8 a5 9d 32 fc 90 <0f> 0b 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f
RSP: 0018:ffffc90003c8fb50 EFLAGS: 00010046
RAX: 000000000000006d RBX: 1ffff1100bef2201 RCX: bc1d858b0da16200
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: ffffc90003c8fcb0 R08: ffffffff81a114cc R09: 1ffff110170e519a
R10: dffffc0000000000 R11: ffffed10170e519b R12: ffff88805f791008
R13: dffffc0000000000 R14: ffff88805f791000 R15: ffff88802029a200
FS:  000055556c140500(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c009736000 CR3: 000000005e410000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:124 [inline]
 __list_del_entry include/linux/list.h:215 [inline]
 list_del include/linux/list.h:229 [inline]
 ref_tracker_free+0x3e6/0x7e0 lib/ref_tracker.c:265
 __netns_tracker_free include/net/net_namespace.h:371 [inline]
 put_net_track include/net/net_namespace.h:386 [inline]
 __sk_destruct+0x3f5/0x690 net/core/sock.c:2307
 sock_put include/net/sock.h:1914 [inline]
 unix_release_sock+0xa70/0xd00 net/unix/af_unix.c:727
 unix_release+0x91/0xc0 net/unix/af_unix.c:1106
 __sock_release net/socket.c:647 [inline]
 sock_close+0xbc/0x240 net/socket.c:1398
 __fput+0x3e9/0x9f0 fs/file_table.c:464
 __do_sys_close fs/open.c:1580 [inline]
 __se_sys_close fs/open.c:1565 [inline]
 __x64_sys_close+0x7f/0x110 fs/open.c:1565
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9cd538c8c7
Code: 44 00 00 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb bc 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007fff090c5388 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007f9cd538c8c7
RDX: 0000000000000000 RSI: 0000000000008933 RDI: 0000000000000005
RBP: 00007fff090c5390 R08: 000000000000000a R09: 00007fff090c53c2
R10: 00007fff090c57c6 R11: 0000000000000246 R12: 00007fff090c5410
R13: 00007f9cd540f3b5 R14: 00007f9cd60d4620 R15: 00007f9cd540f3b5
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x18c/0x190 lib/list_debug.c:65
Code: fa 89 10 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 bb 0e 32 fd 49 8b 56 08 48 c7 c7 00 21 80 8c 4c 89 fe 4c 89 f1 e8 a5 9d 32 fc 90 <0f> 0b 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f
RSP: 0018:ffffc90003c8fb50 EFLAGS: 00010046
RAX: 000000000000006d RBX: 1ffff1100bef2201 RCX: bc1d858b0da16200
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: ffffc90003c8fcb0 R08: ffffffff81a114cc R09: 1ffff110170e519a
R10: dffffc0000000000 R11: ffffed10170e519b R12: ffff88805f791008
R13: dffffc0000000000 R14: ffff88805f791000 R15: ffff88802029a200
FS:  000055556c140500(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c009736000 CR3: 000000005e410000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/03 19:41 upstream 7eb172143d55 c3901742 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-upstream-fs BUG: corrupted list in __sk_destruct
* Struck through repros no longer work on HEAD.