[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CALAgD-72RvKXf37Zx+r2y44eW3XQQh40PTKvAiq67apjEUHWRA@mail.gmail.com>
Date: Sat, 24 Aug 2024 22:08:39 -0700
From: Xingyu Li <xli399@....edu>
To: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: BUG: general protection fault in skb_queue_purge_reason
Hi,
We found a bug in Linux 6.10. It is probably a null pointer dereference bug.
The bug report is as follows, but unfortunately there is no generated
syzkaller reproducer.
Bug report:
Oops: general protection fault, probably for non-canonical address
0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 0 PID: 16200 Comm: syz.1.596 Not tainted 6.10.0 #13
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:__skb_unlink include/linux/skbuff.h:2389 [inline]
RIP: 0010:__skb_dequeue include/linux/skbuff.h:2405 [inline]
RIP: 0010:__skb_queue_purge_reason include/linux/skbuff.h:3259 [inline]
RIP: 0010:skb_queue_purge_reason+0x383/0x500 net/core/skbuff.c:3886
Code: 80 3c 30 00 74 05 e8 cc 7f 24 f9 4c 8b 7b 08 4d 8d 6c 24 08 ba
10 00 00 00 48 89 df 31 f6 e8 54 d0 27 02 4c 89 e8 48 c1 e8 03 <42> 80
3c 30 00 74 08 4c 89 ef e8 1e 80 24 f9 4d 89 7d 00 4c 89 f8
RSP: 0018:ffffc90004e8f6c0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff888044039500 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888044039510
RBP: ffffc90004e8f830 R08: ffffffff910fc66f R09: 0000000000000000
R10: ffff888044039500 R11: fffffbfff221f8ce R12: 0000000000000000
R13: 0000000000000008 R14: dffffc0000000000 R15: ffffc90004e8f760
FS: 0000000000000000(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f39e3546018 CR3: 000000000d932000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
skb_queue_purge include/linux/skbuff.h:3273 [inline]
vhci_flush+0x40/0x50 drivers/bluetooth/hci_vhci.c:69
hci_dev_close_sync+0x728/0xcb0 net/bluetooth/hci_sync.c:5088
hci_dev_do_close net/bluetooth/hci_core.c:512 [inline]
hci_unregister_dev+0x1fd/0x4e0 net/bluetooth/hci_core.c:2728
vhci_release+0x7f/0xd0 drivers/bluetooth/hci_vhci.c:666
__fput+0x24a/0x8a0 fs/file_table.c:422
task_work_run+0x239/0x2f0 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xa13/0x2560 kernel/exit.c:876
do_group_exit+0x1fd/0x2b0 kernel/exit.c:1025
get_signal+0x1697/0x1730 kernel/signal.c:2909
arch_do_signal_or_restart+0x92/0x7f0 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x95/0x280 kernel/entry/common.c:218
do_syscall_64+0x8a/0x150 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x67/0x6f
RIP: 0033:0x7facd07809b9
Code: Unable to access opcode bytes at 0x7facd078098f.
RSP: 002b:00007facd01ff038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: 0000000000000038 RBX: 00007facd0946058 RCX: 00007facd07809b9
RDX: 0000000000000038 RSI: 0000000020000100 RDI: 0000000000000005
RBP: 00007facd07f4f70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007facd0946058 R15: 00007ffefaa5f968
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__skb_unlink include/linux/skbuff.h:2389 [inline]
RIP: 0010:__skb_dequeue include/linux/skbuff.h:2405 [inline]
RIP: 0010:__skb_queue_purge_reason include/linux/skbuff.h:3259 [inline]
RIP: 0010:skb_queue_purge_reason+0x383/0x500 net/core/skbuff.c:3886
Code: 80 3c 30 00 74 05 e8 cc 7f 24 f9 4c 8b 7b 08 4d 8d 6c 24 08 ba
10 00 00 00 48 89 df 31 f6 e8 54 d0 27 02 4c 89 e8 48 c1 e8 03 <42> 80
3c 30 00 74 08 4c 89 ef e8 1e 80 24 f9 4d 89 7d 00 4c 89 f8
RSP: 0018:ffffc90004e8f6c0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff888044039500 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888044039510
RBP: ffffc90004e8f830 R08: ffffffff910fc66f R09: 0000000000000000
R10: ffff888044039500 R11: fffffbfff221f8ce R12: 0000000000000000
R13: 0000000000000008 R14: dffffc0000000000 R15: ffffc90004e8f760
FS: 0000000000000000(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcf60c59398 CR3: 00000000195c0000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 80 3c 30 00 cmpb $0x0,(%rax,%rsi,1)
4: 74 05 je 0xb
6: e8 cc 7f 24 f9 call 0xf9247fd7
b: 4c 8b 7b 08 mov 0x8(%rbx),%r15
f: 4d 8d 6c 24 08 lea 0x8(%r12),%r13
14: ba 10 00 00 00 mov $0x10,%edx
19: 48 89 df mov %rbx,%rdi
1c: 31 f6 xor %esi,%esi
1e: e8 54 d0 27 02 call 0x227d077
23: 4c 89 e8 mov %r13,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1) <-- trapping instruction
2f: 74 08 je 0x39
31: 4c 89 ef mov %r13,%rdi
34: e8 1e 80 24 f9 call 0xf9248057
39: 4d 89 7d 00 mov %r15,0x0(%r13)
3d: 4c 89 f8 mov %r15,%rax
--
Yours sincerely,
Xingyu
Powered by blists - more mailing lists