[Android 5.4] KASAN: use-after-free Write in __run_timers (2)

4 views
Skip to first unread message

syzbot

unread,
Feb 25, 2025, 9:17:26 AM2/25/25
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 6b07fcd94a6a Merge tag 'android12-5.4.290_r00' into androi..
git tree: android12-5.4
console+strace: https://syzkaller.appspot.com/x/log.txt?x=147aec98580000
kernel config: https://syzkaller.appspot.com/x/.config?x=55297da5fb1e8eb8
dashboard link: https://syzkaller.appspot.com/bug?extid=2659421f0005292f59ab
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11e226e4580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=170b97a4580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/20b6b9e6d153/disk-6b07fcd9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e842cfb50fa4/vmlinux-6b07fcd9.xz
kernel image: https://storage.googleapis.com/syzbot-assets/918687f28430/bzImage-6b07fcd9.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+265942...@syzkaller.appspotmail.com

kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 454 Comm: syz-executor264 Not tainted 5.4.290-syzkaller-00017-g6b07fcd94a6a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:__hlist_del include/linux/list.h:791 [inline]
RIP: 0010:detach_timer kernel/time/timer.c:824 [inline]
RIP: 0010:expire_timers kernel/time/timer.c:1482 [inline]
RIP: 0010:__run_timers+0x7b0/0xbe0 kernel/time/timer.c:1817
Code: 89 e7 e8 63 51 3f 00 4d 89 2c 24 4d 85 ed 74 2e e8 a5 66 0f 00 49 83 c5 08 4c 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 ef e8 32 51 3f 00 4d 89 65 00 eb 05 e8 77
RSP: 0018:ffff8881f6e09d60 EFLAGS: 00010802
RAX: 1bd5a00000000025 RBX: 1ffff1103ae4d639 RCX: dffffc0000000000
RDX: 0000000000000101 RSI: 0000000000000004 RDI: ffff8881f6e09ce0
RBP: ffff8881f6e09ec8 R08: dffffc0000000000 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffff8881f6e09e20
R13: dead00000000012a R14: 1ffff1103ae4d638 R15: ffff8881d726b1c8
FS: 0000555559ce7480(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555559ce7438 CR3: 00000001e52b9000 CR4: 00000000003406b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830
__do_softirq+0x23b/0x6b7 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x195/0x1c0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:539 [inline]
smp_apic_timer_interrupt+0x11a/0x490 arch/x86/kernel/apic/apic.c:1161
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
</IRQ>
RIP: 0010:__set_page_owner_handle mm/page_owner.c:171 [inline]
RIP: 0010:__set_page_owner+0xa4/0x1e0 mm/page_owner.c:192
Code: 41 ff cd 49 c7 c7 c0 3e f8 85 49 c1 ef 03 48 8b 05 91 6f 5f 04 48 8d 2c 03 48 8d 7c 03 08 48 89 f8 48 c1 e8 03 42 0f b6 04 30 <84> c0 0f 85 aa 00 00 00 8b 44 24 04 89 45 08 48 89 e8 48 c1 e8 03
RSP: 0018:ffff8881e46ef210 EFLAGS: 00000a02 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: ffff8881f276f8e8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8881f276f8f8
RBP: ffff8881f276f8f0 R08: ffffffff8198b324 R09: ffffed103edcb135
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: 1ffffffff0bf07d8
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook mm/page_alloc.c:2165 [inline]
prep_new_page+0x18f/0x370 mm/page_alloc.c:2171
get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794
__alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893
__alloc_pages include/linux/gfp.h:503 [inline]
__alloc_pages_node include/linux/gfp.h:516 [inline]
alloc_pages_node include/linux/gfp.h:530 [inline]
pcpu_alloc_pages mm/percpu-vm.c:94 [inline]
pcpu_populate_chunk+0x1bb/0xd00 mm/percpu-vm.c:284
pcpu_alloc+0x79e/0x1050 mm/percpu.c:1714
prealloc_init+0x238/0x800 kernel/bpf/hashtab.c:154
htab_map_alloc+0x638/0x930 kernel/bpf/hashtab.c:385
find_and_alloc_map kernel/bpf/syscall.c:122 [inline]
map_create kernel/bpf/syscall.c:573 [inline]
__do_sys_bpf kernel/bpf/syscall.c:2873 [inline]
__se_sys_bpf+0x3291/0xbcb0 kernel/bpf/syscall.c:2849
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7f4300555899
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 1f 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd4c737a68 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f4300555899
RDX: 0000000000000048 RSI: 0000400000000840 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000003
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd4c737a98
R13: 00007ffd4c737ad0 R14: 0000000000000004 R15: 431bde82d7b634db
Modules linked in:
---[ end trace c50793ccf37d12dc ]---
RIP: 0010:__hlist_del include/linux/list.h:791 [inline]
RIP: 0010:detach_timer kernel/time/timer.c:824 [inline]
RIP: 0010:expire_timers kernel/time/timer.c:1482 [inline]
RIP: 0010:__run_timers+0x7b0/0xbe0 kernel/time/timer.c:1817
Code: 89 e7 e8 63 51 3f 00 4d 89 2c 24 4d 85 ed 74 2e e8 a5 66 0f 00 49 83 c5 08 4c 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 ef e8 32 51 3f 00 4d 89 65 00 eb 05 e8 77
RSP: 0018:ffff8881f6e09d60 EFLAGS: 00010802
RAX: 1bd5a00000000025 RBX: 1ffff1103ae4d639 RCX: dffffc0000000000
RDX: 0000000000000101 RSI: 0000000000000004 RDI: ffff8881f6e09ce0
RBP: ffff8881f6e09ec8 R08: dffffc0000000000 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: ffff8881f6e09e20
R13: dead00000000012a R14: 1ffff1103ae4d638 R15: ffff8881d726b1c8
FS: 0000555559ce7480(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555559ce7438 CR3: 00000001e52b9000 CR4: 00000000003406b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 89 e7 mov %esp,%edi
2: e8 63 51 3f 00 call 0x3f516a
7: 4d 89 2c 24 mov %r13,(%r12)
b: 4d 85 ed test %r13,%r13
e: 74 2e je 0x3e
10: e8 a5 66 0f 00 call 0xf66ba
15: 49 83 c5 08 add $0x8,%r13
19: 4c 89 e8 mov %r13,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 4c 89 ef mov %r13,%rdi
33: e8 32 51 3f 00 call 0x3f516a
38: 4d 89 65 00 mov %r12,0x0(%r13)
3c: eb 05 jmp 0x43
3e: e8 .byte 0xe8
3f: 77 .byte 0x77


---
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
Reply all
Reply to author
Forward
0 new messages