syzbot


memory leak in hwsim_add_one

Status: fixed on 2021/11/10 00:50
Subsystems: wpan
[Documentation on labels]
Reported-by: syzbot+b80c9959009a9325cdff@syzkaller.appspotmail.com
Fix commit: 28a5501c3383 ieee802154: hwsim: Fix memory leak in hwsim_add_one
First crash: 1275d, last: 1275d
Discussions (9)
Title Replies (including bot) Last reply
[PATCH 5.13 000/800] 5.13.2-rc1 review 840 (840) 2021/07/28 17:46
[PATCH 4.19 000/421] 4.19.198-rc1 review 423 (423) 2021/07/19 16:00
[PATCH 5.10 000/593] 5.10.50-rc1 review 615 (615) 2021/07/16 05:18
[PATCH 5.12 000/700] 5.12.17-rc1 review 708 (708) 2021/07/13 21:37
[PATCH 5.4 000/348] 5.4.132-rc1 review 354 (354) 2021/07/12 18:54
[PATCH v2] ieee802154: hwsim: Fix memory leak in hwsim_add_one 3 (3) 2021/06/22 19:21
Suggestions on how to debug kernel crashes where printk and gdb both does not work 12 (12) 2021/06/16 02:11
[PATCH] ieee802154: hwsim: Fix memory leak in hwsim_add_one 1 (1) 2021/06/15 11:24
[syzbot] memory leak in hwsim_add_one 0 (1) 2021/06/07 15:45
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in hwsim_add_one (2) wpan input usb syz 1 441d 437d 0/28 auto-obsoleted due to no activity on 2024/07/11 06:56
Last patch testing requests (2)
Created Duration User Patch Repo Result
2021/06/15 09:28 21m mudongliangabcd@gmail.com patch upstream OK
2021/06/14 18:57 8m chouhan.shreyansh630@gmail.com upstream report log

Sample crash report:
Warning: Permanently added '10.128.1.19' (ECDSA) to the list of known hosts.
executing program
BUG: memory leak
unreferenced object 0xffff8881020ec480 (size 64):
  comm "swapper/0", pid 1, jiffies 4294937719 (age 53.000s)
  hex dump (first 32 bytes):
    60 5d 7c 06 81 88 ff ff c0 17 65 04 81 88 ff ff  `]|.......e.....
    80 35 12 42 81 88 ff ff 80 35 12 42 81 88 ff ff  .5.B.....5.B....
  backtrace:
    [<ffffffff82b09f12>] kmalloc include/linux/slab.h:556 [inline]
    [<ffffffff82b09f12>] kzalloc include/linux/slab.h:686 [inline]
    [<ffffffff82b09f12>] hwsim_alloc_edge.constprop.0+0x22/0x80 drivers/net/ieee802154/mac802154_hwsim.c:385
    [<ffffffff82b0b0f3>] hwsim_subscribe_all_others drivers/net/ieee802154/mac802154_hwsim.c:709 [inline]
    [<ffffffff82b0b0f3>] hwsim_add_one+0x3b3/0x640 drivers/net/ieee802154/mac802154_hwsim.c:802
    [<ffffffff82b0b3c4>] hwsim_probe+0x44/0xd0 drivers/net/ieee802154/mac802154_hwsim.c:848
    [<ffffffff82628bf1>] platform_probe+0x81/0x120 drivers/base/platform.c:1447
    [<ffffffff82625679>] really_probe+0x159/0x500 drivers/base/dd.c:576
    [<ffffffff82625aab>] driver_probe_device+0x8b/0x100 drivers/base/dd.c:763
    [<ffffffff82626325>] device_driver_attach+0x105/0x110 drivers/base/dd.c:1039
    [<ffffffff826263d1>] __driver_attach drivers/base/dd.c:1117 [inline]
    [<ffffffff826263d1>] __driver_attach+0xa1/0x140 drivers/base/dd.c:1070
    [<ffffffff82622459>] bus_for_each_dev+0xa9/0x100 drivers/base/bus.c:305
    [<ffffffff826244e0>] bus_add_driver+0x160/0x280 drivers/base/bus.c:622
    [<ffffffff82627233>] driver_register+0xc3/0x150 drivers/base/driver.c:171
    [<ffffffff874fa3dc>] hwsim_init_module+0xae/0x107 drivers/net/ieee802154/mac802154_hwsim.c:899
    [<ffffffff81001083>] do_one_initcall+0x63/0x2e0 init/main.c:1249
    [<ffffffff87489873>] do_initcall_level init/main.c:1322 [inline]
    [<ffffffff87489873>] do_initcalls init/main.c:1338 [inline]
    [<ffffffff87489873>] do_basic_setup init/main.c:1358 [inline]
    [<ffffffff87489873>] kernel_init_freeable+0x1f4/0x26e init/main.c:1560
    [<ffffffff84359255>] kernel_init+0xc/0x1a7 init/main.c:1447
    [<ffffffff810022ef>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff8881046517c0 (size 32):
  comm "swapper/0", pid 1, jiffies 4294937719 (age 53.000s)
  hex dump (first 32 bytes):
    ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff82b09f35>] kmalloc include/linux/slab.h:556 [inline]
    [<ffffffff82b09f35>] kzalloc include/linux/slab.h:686 [inline]
    [<ffffffff82b09f35>] hwsim_alloc_edge.constprop.0+0x45/0x80 drivers/net/ieee802154/mac802154_hwsim.c:389
    [<ffffffff82b0b0f3>] hwsim_subscribe_all_others drivers/net/ieee802154/mac802154_hwsim.c:709 [inline]
    [<ffffffff82b0b0f3>] hwsim_add_one+0x3b3/0x640 drivers/net/ieee802154/mac802154_hwsim.c:802
    [<ffffffff82b0b3c4>] hwsim_probe+0x44/0xd0 drivers/net/ieee802154/mac802154_hwsim.c:848
    [<ffffffff82628bf1>] platform_probe+0x81/0x120 drivers/base/platform.c:1447
    [<ffffffff82625679>] really_probe+0x159/0x500 drivers/base/dd.c:576
    [<ffffffff82625aab>] driver_probe_device+0x8b/0x100 drivers/base/dd.c:763
    [<ffffffff82626325>] device_driver_attach+0x105/0x110 drivers/base/dd.c:1039
    [<ffffffff826263d1>] __driver_attach drivers/base/dd.c:1117 [inline]
    [<ffffffff826263d1>] __driver_attach+0xa1/0x140 drivers/base/dd.c:1070
    [<ffffffff82622459>] bus_for_each_dev+0xa9/0x100 drivers/base/bus.c:305
    [<ffffffff826244e0>] bus_add_driver+0x160/0x280 drivers/base/bus.c:622
    [<ffffffff82627233>] driver_register+0xc3/0x150 drivers/base/driver.c:171
    [<ffffffff874fa3dc>] hwsim_init_module+0xae/0x107 drivers/net/ieee802154/mac802154_hwsim.c:899
    [<ffffffff81001083>] do_one_initcall+0x63/0x2e0 init/main.c:1249
    [<ffffffff87489873>] do_initcall_level init/main.c:1322 [inline]
    [<ffffffff87489873>] do_initcalls init/main.c:1338 [inline]
    [<ffffffff87489873>] do_basic_setup init/main.c:1358 [inline]
    [<ffffffff87489873>] kernel_init_freeable+0x1f4/0x26e init/main.c:1560
    [<ffffffff84359255>] kernel_init+0xc/0x1a7 init/main.c:1447
    [<ffffffff810022ef>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/06/05 21:56 upstream 9d32fa5d74b1 500c2339 .config console log report syz C ci-upstream-gce-leak memory leak in hwsim_add_one
* Struck through repros no longer work on HEAD.