syzbot


KASAN: use-after-free Write in __alloc_skb (2)

Status: upstream: reported C repro on 2020/07/24 01:04
Reported-by: syzbot+4fcc32fe7c89dc09679d@syzkaller.appspotmail.com
First crash: 751d, last: 24d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Write in __alloc_skb C done 2 945d 1012d 1/1 fixed on 2020/02/11 15:16
upstream KASAN: use-after-free Write in __alloc_skb (3) C done inconclusive 2 377d 745d 0/23 upstream: reported C repro on 2020/07/29 18:24
upstream KASAN: use-after-free Write in __alloc_skb (2) C done 7 958d 975d 16/23 fixed on 2020/02/18 14:31
upstream KASAN: use-after-free Write in __alloc_skb 2 999d 1005d 0/23 closed as invalid on 2019/12/08 05:44
linux-4.14 KASAN: use-after-free Write in __alloc_skb C done 1 944d 975d 1/1 fixed on 2020/02/14 21:56

Sample crash report:
batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-224)
batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-224)
batman_adv: batadv0: Forced to purge local tt entries to fit new maximum fragment MTU (-224)
==================================================================
BUG: KASAN: use-after-free in memset include/linux/string.h:357 [inline]
BUG: KASAN: use-after-free in __alloc_skb+0x2e0/0x510 net/core/skbuff.c:234
Write of size 36 at addr ffff88819ff98300 by task swapper/0/0

CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report+0x6f/0x7b mm/kasan/report.c:409
 memset+0x20/0x40 mm/kasan/kasan.c:285
 memset include/linux/string.h:357 [inline]
 __alloc_skb+0x2e0/0x510 net/core/skbuff.c:234
 alloc_skb include/linux/skbuff.h:980 [inline]
 alloc_skb_with_frags+0x85/0x500 net/core/skbuff.c:5228
 sock_alloc_send_pskb+0x577/0x6d0 net/core/sock.c:2083
 mld_newpack+0x1cb/0x720 net/ipv6/mcast.c:1585
 add_grhead+0x265/0x330 net/ipv6/mcast.c:1691
 add_grec+0xc40/0xed0 net/ipv6/mcast.c:1822
 mld_send_cr net/ipv6/mcast.c:1948 [inline]
 mld_ifc_timer_expire+0x508/0xcd0 net/ipv6/mcast.c:2455
 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1279
 expire_timers+0x232/0x4d0 kernel/time/timer.c:1318
 __run_timers kernel/time/timer.c:1636 [inline]
 run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1649
 __do_softirq+0x254/0xa1d kernel/softirq.c:288
 invoke_softirq kernel/softirq.c:368 [inline]
 irq_exit+0x193/0x240 kernel/softirq.c:409
 exiting_irq arch/x86/include/asm/apic.h:648 [inline]
 smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1102
 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793
 </IRQ>
RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61
RSP: 0018:ffffffff87c07e78 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10
RAX: 1ffffffff0fa2d24 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffffffff87c76b44
RBP: ffffffff87d16910 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: fffffbfff0f8ec58
R13: ffffffff87c762c0 R14: 0000000000000000 R15: 0000000000000000
 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline]
 default_idle+0x47/0x370 arch/x86/kernel/process.c:558
 cpuidle_idle_call kernel/sched/idle.c:156 [inline]
 do_idle+0x250/0x3c0 kernel/sched/idle.c:246
 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:351
 start_kernel+0x750/0x770 init/main.c:708
 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:240

The buggy address belongs to the page:
page:ffffea00067fe600 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x57ffe0000000000()
raw: 057ffe0000000000 0000000000000000 0000000000000000 00000000ffffffff
raw: ffffea00067fe620 ffffea00067fe620 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88819ff98200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88819ff98280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88819ff98300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff88819ff98380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88819ff98400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2022/07/21 03:27 linux-4.14.y 424a46ea058e 70c104a1 .config log report syz C
ci2-linux-4-14 2022/06/21 02:25 linux-4.14.y 84bae26850e3 70c104a1 .config log report syz C
ci2-linux-4-14 2022/05/22 00:43 linux-4.14.y dffb5c6ff09c 70c104a1 .config log report syz C
ci2-linux-4-14 2022/04/22 00:06 linux-4.14.y 15a1c6b6f516 70c104a1 .config log report syz C
ci2-linux-4-14 2022/03/22 23:43 linux-4.14.y eb045674aab3 70c104a1 .config log report syz C
ci2-linux-4-14 2022/02/20 06:56 linux-4.14.y a35d65bedfbc 70c104a1 .config log report syz C
ci2-linux-4-14 2022/01/21 06:21 linux-4.14.y 4ba8e26127c3 70c104a1 .config log report syz C
ci2-linux-4-14 2021/12/22 05:03 linux-4.14.y 9dfbac0e6b86 70c104a1 .config log report syz C
ci2-linux-4-14 2021/11/22 04:37 linux-4.14.y 5f9f3b0057d5 70c104a1 .config log report syz C
ci2-linux-4-14 2021/10/23 04:10 linux-4.14.y 2760370b1649 70c104a1 .config log report syz C
ci2-linux-4-14 2021/09/22 10:46 linux-4.14.y 8ea4f73cfa7e 70c104a1 .config log report syz C
ci2-linux-4-14 2021/08/23 09:58 linux-4.14.y 162b95d01320 70c104a1 .config log report syz C
ci2-linux-4-14 2021/07/24 09:26 linux-4.14.y 964f3712e6a7 70c104a1 .config log report syz C
ci2-linux-4-14 2021/06/24 08:54 linux-4.14.y cfb41ef9deb1 70c104a1 .config log report syz C
ci2-linux-4-14 2021/05/25 01:17 linux-4.14.y 96afcb20f36f 70c104a1 .config log report syz C
ci2-linux-4-14 2021/04/24 23:33 linux-4.14.y cf256fbcbe34 70c104a1 .config log report syz C
ci2-linux-4-14 2021/03/25 15:47 linux-4.14.y 670d6552eda8 70c104a1 .config log report syz C
ci2-linux-4-14 2021/02/23 14:08 linux-4.14.y 3242aa3a635c 70c104a1 .config log report syz C
ci2-linux-4-14 2021/01/20 06:22 linux-4.14.y 2762b48e9611 70c104a1 .config log report syz C
ci2-linux-4-14 2020/12/21 05:43 linux-4.14.y 3f2ecb86cb90 70c104a1 .config log report syz C
ci2-linux-4-14 2020/11/21 05:16 linux-4.14.y 8961076ed318 70c104a1 .config log report syz C
ci2-linux-4-14 2020/10/22 04:29 linux-4.14.y 5b7a52cd2eef 70c104a1 .config log report syz C
ci2-linux-4-14 2020/09/22 02:00 linux-4.14.y cbfa1702aaf6 70c104a1 .config log report syz C
ci2-linux-4-14 2020/08/23 01:34 linux-4.14.y 6a24ca2506d6 70c104a1 .config log report syz C
Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2020/07/24 01:03 linux-4.14.y 69b94dd6dcd1 70c104a1 .config log report syz C