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: 1568d, last: 628d
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 1762d 1830d 1/1 fixed on 2020/02/11 15:16
upstream KASAN: use-after-free Write in __alloc_skb (3) net C done inconclusive 2 1194d 1563d 0/28 auto-obsoleted due to no activity on 2023/04/15 03:58
upstream KASAN: use-after-free Write in __alloc_skb (2) net C done 7 1776d 1792d 15/28 fixed on 2020/02/18 14:31
upstream KASAN: use-after-free Write in __alloc_skb net 2 1816d 1822d 0/28 closed as invalid on 2019/12/08 05:44
linux-4.14 KASAN: use-after-free Write in __alloc_skb C done 1 1762d 1792d 1/1 fixed on 2020/02/14 21:56
Fix bisection attempts (25)
Created Duration User Patch Repo Result
2023/02/19 08:06 34m bisect fix linux-4.14.y OK (0) job log log
2023/01/20 00:17 26m bisect fix linux-4.14.y OK (0) job log log
2022/10/26 21:51 27m bisect fix linux-4.14.y OK (0) job log log
2022/09/19 03:53 26m bisect fix linux-4.14.y OK (0) job log log
2022/08/20 03:27 26m bisect fix linux-4.14.y OK (0) job log log
2022/07/21 02:59 27m bisect fix linux-4.14.y OK (0) job log log
2022/06/21 01:58 27m bisect fix linux-4.14.y OK (0) job log log
2022/05/22 00:06 36m bisect fix linux-4.14.y OK (0) job log log
2022/04/21 23:43 23m bisect fix linux-4.14.y OK (0) job log log
2022/03/22 23:13 29m bisect fix linux-4.14.y OK (0) job log log
2022/02/20 06:26 29m bisect fix linux-4.14.y OK (0) job log log
2022/01/21 05:48 32m bisect fix linux-4.14.y OK (0) job log log
2021/12/22 04:37 25m bisect fix linux-4.14.y OK (0) job log log
2021/11/22 04:10 26m bisect fix linux-4.14.y OK (0) job log log
2021/10/23 03:38 31m bisect fix linux-4.14.y OK (0) job log log
2021/09/22 10:15 31m bisect fix linux-4.14.y OK (0) job log log
2021/08/23 09:26 31m bisect fix linux-4.14.y OK (0) job log log
2021/07/24 08:54 32m bisect fix linux-4.14.y OK (0) job log log
2021/06/24 08:31 23m bisect fix linux-4.14.y OK (0) job log log
2021/05/25 00:48 29m bisect fix linux-4.14.y OK (0) job log log
2021/04/24 23:04 29m bisect fix linux-4.14.y OK (0) job log log
2021/03/25 15:22 24m bisect fix linux-4.14.y OK (0) job log log
2021/02/23 13:43 25m bisect fix linux-4.14.y OK (0) job log log
2021/02/19 08:39 18m bisect fix linux-4.14.y error job log
2021/01/20 05:55 26m bisect fix linux-4.14.y OK (0) job log log

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
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/24 01:03 linux-4.14.y 69b94dd6dcd1 70c104a1 .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.