KASAN: null-ptr-deref Read in batadv_tvlv_container_ogm_append

11 views
Skip to first unread message

syzbot

unread,
Dec 28, 2019, 12:41:09 AM12/28/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: e1f7d50a Linux 4.14.160
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16f06d25e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=46599517442ad9fb
dashboard link: https://syzkaller.appspot.com/bug?extid=766ed22c6f4ad054d4f8
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

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

device gretap0 left promiscuous mode
bridge0: port 3(gretap0) entered disabled state
batman_adv: batadv0: Interface deactivated: veth0_to_bridge
batman_adv: batadv0: Removing interface: veth0_to_bridge
==================================================================
BUG: KASAN: null-ptr-deref in memcpy include/linux/string.h:347 [inline]
BUG: KASAN: null-ptr-deref in batadv_tvlv_realloc_packet_buff
net/batman-adv/tvlv.c:294 [inline]
BUG: KASAN: null-ptr-deref in batadv_tvlv_container_ogm_append+0x172/0x480
net/batman-adv/tvlv.c:329
Read of size 24 at addr (null) by task kworker/u4:4/2311

CPU: 0 PID: 2311 Comm: kworker/u4:4 Not tainted 4.14.160-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x142/0x197 lib/dump_stack.c:58
kasan_report_error mm/kasan/report.c:349 [inline]
kasan_report mm/kasan/report.c:409 [inline]
kasan_report.cold+0x127/0x2af mm/kasan/report.c:393
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
memcpy+0x24/0x50 mm/kasan/kasan.c:302
memcpy include/linux/string.h:347 [inline]
batadv_tvlv_realloc_packet_buff net/batman-adv/tvlv.c:294 [inline]
batadv_tvlv_container_ogm_append+0x172/0x480 net/batman-adv/tvlv.c:329
batadv_iv_ogm_schedule+0xba0/0xe20 net/batman-adv/bat_iv_ogm.c:945
batadv_iv_send_outstanding_bat_ogm_packet+0x4a1/0x680
net/batman-adv/bat_iv_ogm.c:1809
process_one_work+0x863/0x1600 kernel/workqueue.c:2114
worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248
kthread+0x319/0x430 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
==================================================================
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 2311 Comm: kworker/u4:4 Tainted: G B
4.14.160-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x142/0x197 lib/dump_stack.c:58
panic+0x1f9/0x42d kernel/panic.c:183
kasan_end_report+0x47/0x4f mm/kasan/report.c:176
kasan_report_error mm/kasan/report.c:356 [inline]
kasan_report mm/kasan/report.c:409 [inline]
kasan_report.cold+0x130/0x2af mm/kasan/report.c:393
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
memcpy+0x24/0x50 mm/kasan/kasan.c:302
memcpy include/linux/string.h:347 [inline]
batadv_tvlv_realloc_packet_buff net/batman-adv/tvlv.c:294 [inline]
batadv_tvlv_container_ogm_append+0x172/0x480 net/batman-adv/tvlv.c:329
batadv_iv_ogm_schedule+0xba0/0xe20 net/batman-adv/bat_iv_ogm.c:945
batadv_iv_send_outstanding_bat_ogm_packet+0x4a1/0x680
net/batman-adv/bat_iv_ogm.c:1809
process_one_work+0x863/0x1600 kernel/workqueue.c:2114
worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248
kthread+0x319/0x430 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jul 15, 2020, 6:43:13 PM7/15/20
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages