[syzbot] memory leak in cfg80211_inform_single_bss_frame_data

41 views
Skip to first unread message

syzbot

unread,
Jun 2, 2021, 12:37:28 PM6/2/21
to da...@davemloft.net, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b90e90f4 Merge branch 'i2c/for-current' of git://git.kerne..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13bd382fd00000
kernel config: https://syzkaller.appspot.com/x/.config?x=b8c23f7848d1c696
dashboard link: https://syzkaller.appspot.com/bug?extid=7a942657a255a9d9b18a
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=131ce883d00000

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

BUG: memory leak
unreferenced object 0xffff888119584780 (size 96):
comm "kworker/u4:0", pid 8670, jiffies 4295047890 (age 8.810s)
hex dump (first 32 bytes):
fd f0 0a 3d 90 c3 05 00 00 00 00 00 00 00 00 00 ...=............
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff83e52709>] cfg80211_inform_single_bss_frame_data+0x139/0x640 net/wireless/scan.c:2376
[<ffffffff83e52c5b>] cfg80211_inform_bss_frame_data+0x4b/0x470 net/wireless/scan.c:2437
[<ffffffff83ef1d43>] ieee80211_bss_info_update+0x183/0x470 net/mac80211/scan.c:190
[<ffffffff83eff43b>] ieee80211_rx_bss_info net/mac80211/ibss.c:1126 [inline]
[<ffffffff83eff43b>] ieee80211_rx_mgmt_probe_beacon+0x60b/0x950 net/mac80211/ibss.c:1615
[<ffffffff83effe8c>] ieee80211_ibss_rx_queued_mgmt+0x23c/0x6e0 net/mac80211/ibss.c:1642
[<ffffffff83f01d76>] ieee80211_iface_work+0x476/0x5f0 net/mac80211/iface.c:1437
[<ffffffff8125f9d9>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2276
[<ffffffff812602c9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2422
[<ffffffff81267bf8>] kthread+0x178/0x1b0 kernel/kthread.c:313
[<ffffffff810022ef>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff888119584680 (size 96):
comm "kworker/u4:0", pid 8670, jiffies 4295048012 (age 7.590s)
hex dump (first 32 bytes):
f4 b0 1d 3d 90 c3 05 00 00 00 00 00 00 00 00 00 ...=............
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff83e52709>] cfg80211_inform_single_bss_frame_data+0x139/0x640 net/wireless/scan.c:2376
[<ffffffff83e52c5b>] cfg80211_inform_bss_frame_data+0x4b/0x470 net/wireless/scan.c:2437
[<ffffffff83ef1d43>] ieee80211_bss_info_update+0x183/0x470 net/mac80211/scan.c:190
[<ffffffff83eff43b>] ieee80211_rx_bss_info net/mac80211/ibss.c:1126 [inline]
[<ffffffff83eff43b>] ieee80211_rx_mgmt_probe_beacon+0x60b/0x950 net/mac80211/ibss.c:1615
[<ffffffff83effe8c>] ieee80211_ibss_rx_queued_mgmt+0x23c/0x6e0 net/mac80211/ibss.c:1642
[<ffffffff83f01d76>] ieee80211_iface_work+0x476/0x5f0 net/mac80211/iface.c:1437
[<ffffffff8125f9d9>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2276
[<ffffffff812602c9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2422
[<ffffffff81267bf8>] kthread+0x178/0x1b0 kernel/kthread.c:313
[<ffffffff810022ef>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff888119584400 (size 96):
comm "kworker/u4:0", pid 8670, jiffies 4295048012 (age 7.590s)
hex dump (first 32 bytes):
f5 b0 1d 3d 90 c3 05 00 00 00 00 00 00 00 00 00 ...=............
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff83e52709>] cfg80211_inform_single_bss_frame_data+0x139/0x640 net/wireless/scan.c:2376
[<ffffffff83e52c5b>] cfg80211_inform_bss_frame_data+0x4b/0x470 net/wireless/scan.c:2437
[<ffffffff83ef1d43>] ieee80211_bss_info_update+0x183/0x470 net/mac80211/scan.c:190
[<ffffffff83eff43b>] ieee80211_rx_bss_info net/mac80211/ibss.c:1126 [inline]
[<ffffffff83eff43b>] ieee80211_rx_mgmt_probe_beacon+0x60b/0x950 net/mac80211/ibss.c:1615
[<ffffffff83effe8c>] ieee80211_ibss_rx_queued_mgmt+0x23c/0x6e0 net/mac80211/ibss.c:1642
[<ffffffff83f01d76>] ieee80211_iface_work+0x476/0x5f0 net/mac80211/iface.c:1437
[<ffffffff8125f9d9>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2276
[<ffffffff812602c9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2422
[<ffffffff81267bf8>] kthread+0x178/0x1b0 kernel/kthread.c:313
[<ffffffff810022ef>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

BUG: memory leak
unreferenced object 0xffff8881196dda80 (size 96):
comm "kworker/u4:1", pid 8689, jiffies 4295048023 (age 7.480s)
hex dump (first 32 bytes):
e4 40 1f 3d 90 c3 05 00 00 00 00 00 00 00 00 00 .@.=............
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff83e52709>] cfg80211_inform_single_bss_frame_data+0x139/0x640 net/wireless/scan.c:2376
[<ffffffff83e52c5b>] cfg80211_inform_bss_frame_data+0x4b/0x470 net/wireless/scan.c:2437
[<ffffffff83ef1d43>] ieee80211_bss_info_update+0x183/0x470 net/mac80211/scan.c:190
[<ffffffff83eff43b>] ieee80211_rx_bss_info net/mac80211/ibss.c:1126 [inline]
[<ffffffff83eff43b>] ieee80211_rx_mgmt_probe_beacon+0x60b/0x950 net/mac80211/ibss.c:1615
[<ffffffff83effe8c>] ieee80211_ibss_rx_queued_mgmt+0x23c/0x6e0 net/mac80211/ibss.c:1642
[<ffffffff83f01d76>] ieee80211_iface_work+0x476/0x5f0 net/mac80211/iface.c:1437
[<ffffffff8125f9d9>] process_one_work+0x2c9/0x600 kernel/workqueue.c:2276
[<ffffffff812602c9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2422
[<ffffffff81267bf8>] kthread+0x178/0x1b0 kernel/kthread.c:313
[<ffffffff810022ef>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294



---
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.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Jun 4, 2021, 4:00:12 AM6/4/21
to mudongl...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
no output from test machine



Tested on:

commit: f88cd3fb Merge tag 'vfio-v5.13-rc5' of git://github.com/aw..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=175d4bb0300000
kernel config: https://syzkaller.appspot.com/x/.config?x=90a097b1fc34e3d9
dashboard link: https://syzkaller.appspot.com/bug?extid=7a942657a255a9d9b18a
compiler:

syzbot

unread,
Oct 25, 2021, 6:33:25 PM10/25/21
to da...@davemloft.net, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, mudongl...@gmail.com, net...@vger.kernel.org, phin...@gmail.com, syzkall...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 87066fdd2e30 Revert "mm/secretmem: use refcount_t instead ..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16b55554b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=d25eeb482b0f99b
dashboard link: https://syzkaller.appspot.com/bug?extid=7a942657a255a9d9b18a
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=171cf464b00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1396b19f300000

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

BUG: memory leak
unreferenced object 0xffff88810f3c7980 (size 96):
comm "kworker/u4:0", pid 8, jiffies 4294948721 (age 17.180s)
hex dump (first 32 bytes):
e5 90 aa e8 34 cf 05 00 00 00 00 00 00 00 00 00 ....4...........
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff83ee74a9>] cfg80211_inform_single_bss_frame_data+0x139/0x640 net/wireless/scan.c:2383
[<ffffffff83ee79fb>] cfg80211_inform_bss_frame_data+0x4b/0x470 net/wireless/scan.c:2444
[<ffffffff83f8865e>] ieee80211_bss_info_update+0x16e/0x460 net/mac80211/scan.c:190
[<ffffffff83f9687a>] ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline]
[<ffffffff83f9687a>] ieee80211_rx_mgmt_probe_beacon+0x61a/0x970 net/mac80211/ibss.c:1608
[<ffffffff83f972dc>] ieee80211_ibss_rx_queued_mgmt+0x23c/0x6e0 net/mac80211/ibss.c:1635
[<ffffffff83f99347>] ieee80211_iface_process_skb net/mac80211/iface.c:1439 [inline]
[<ffffffff83f99347>] ieee80211_iface_work+0x5f7/0x770 net/mac80211/iface.c:1493
[<ffffffff81265dbf>] process_one_work+0x2cf/0x620 kernel/workqueue.c:2297
[<ffffffff812666c9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2444
[<ffffffff8126fc48>] kthread+0x188/0x1d0 kernel/kthread.c:319
[<ffffffff810022cf>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff88810f3c7b00 (size 96):
comm "kworker/u4:0", pid 8, jiffies 4294948721 (age 17.180s)
hex dump (first 32 bytes):
f5 90 aa e8 34 cf 05 00 00 00 00 00 00 00 00 00 ....4...........
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff83ee74a9>] cfg80211_inform_single_bss_frame_data+0x139/0x640 net/wireless/scan.c:2383
[<ffffffff83ee79fb>] cfg80211_inform_bss_frame_data+0x4b/0x470 net/wireless/scan.c:2444
[<ffffffff83f8865e>] ieee80211_bss_info_update+0x16e/0x460 net/mac80211/scan.c:190
[<ffffffff83f9687a>] ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline]
[<ffffffff83f9687a>] ieee80211_rx_mgmt_probe_beacon+0x61a/0x970 net/mac80211/ibss.c:1608
[<ffffffff83f972dc>] ieee80211_ibss_rx_queued_mgmt+0x23c/0x6e0 net/mac80211/ibss.c:1635
[<ffffffff83f99347>] ieee80211_iface_process_skb net/mac80211/iface.c:1439 [inline]
[<ffffffff83f99347>] ieee80211_iface_work+0x5f7/0x770 net/mac80211/iface.c:1493
[<ffffffff81265dbf>] process_one_work+0x2cf/0x620 kernel/workqueue.c:2297
[<ffffffff812666c9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2444
[<ffffffff8126fc48>] kthread+0x188/0x1d0 kernel/kthread.c:319
[<ffffffff810022cf>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff88810f3c7680 (size 96):
comm "kworker/u4:1", pid 146, jiffies 4294948731 (age 17.080s)
hex dump (first 32 bytes):
e9 20 ac e8 34 cf 05 00 00 00 00 00 00 00 00 00 . ..4...........
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff83ee74a9>] cfg80211_inform_single_bss_frame_data+0x139/0x640 net/wireless/scan.c:2383
[<ffffffff83ee79fb>] cfg80211_inform_bss_frame_data+0x4b/0x470 net/wireless/scan.c:2444
[<ffffffff83f8865e>] ieee80211_bss_info_update+0x16e/0x460 net/mac80211/scan.c:190
[<ffffffff83f9687a>] ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline]
[<ffffffff83f9687a>] ieee80211_rx_mgmt_probe_beacon+0x61a/0x970 net/mac80211/ibss.c:1608
[<ffffffff83f972dc>] ieee80211_ibss_rx_queued_mgmt+0x23c/0x6e0 net/mac80211/ibss.c:1635
[<ffffffff83f99347>] ieee80211_iface_process_skb net/mac80211/iface.c:1439 [inline]
[<ffffffff83f99347>] ieee80211_iface_work+0x5f7/0x770 net/mac80211/iface.c:1493
[<ffffffff81265dbf>] process_one_work+0x2cf/0x620 kernel/workqueue.c:2297
[<ffffffff812666c9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2444
[<ffffffff8126fc48>] kthread+0x188/0x1d0 kernel/kthread.c:319
[<ffffffff810022cf>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

BUG: memory leak
unreferenced object 0xffff888111520f80 (size 96):
comm "kworker/u4:1", pid 146, jiffies 4294948731 (age 17.080s)
hex dump (first 32 bytes):
fb 20 ac e8 34 cf 05 00 00 00 00 00 00 00 00 00 . ..4...........
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff83ee74a9>] cfg80211_inform_single_bss_frame_data+0x139/0x640 net/wireless/scan.c:2383
[<ffffffff83ee79fb>] cfg80211_inform_bss_frame_data+0x4b/0x470 net/wireless/scan.c:2444
[<ffffffff83f8865e>] ieee80211_bss_info_update+0x16e/0x460 net/mac80211/scan.c:190
[<ffffffff83f9687a>] ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline]
[<ffffffff83f9687a>] ieee80211_rx_mgmt_probe_beacon+0x61a/0x970 net/mac80211/ibss.c:1608
[<ffffffff83f972dc>] ieee80211_ibss_rx_queued_mgmt+0x23c/0x6e0 net/mac80211/ibss.c:1635
[<ffffffff83f99347>] ieee80211_iface_process_skb net/mac80211/iface.c:1439 [inline]
[<ffffffff83f99347>] ieee80211_iface_work+0x5f7/0x770 net/mac80211/iface.c:1493
[<ffffffff81265dbf>] process_one_work+0x2cf/0x620 kernel/workqueue.c:2297
[<ffffffff812666c9>] worker_thread+0x59/0x5d0 kernel/workqueue.c:2444
[<ffffffff8126fc48>] kthread+0x188/0x1d0 kernel/kthread.c:319
[<ffffffff810022cf>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295


Fabio M. De Francesco

unread,
Oct 26, 2021, 5:27:35 AM10/26/21
to da...@davemloft.net, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, mudongl...@gmail.com, net...@vger.kernel.org, phin...@gmail.com, syzkall...@googlegroups.com, syzbot
On Tuesday, October 26, 2021 12:33:23 AM CEST syzbot wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 87066fdd2e30 Revert "mm/secretmem: use refcount_t instead
..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=16b55554b00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=d25eeb482b0f99b
> dashboard link: https://syzkaller.appspot.com/bug?
extid=7a942657a255a9d9b18a
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils
for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=171cf464b00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1396b19f300000
>
> IMPORTANT: if you fix the issue, please add the following tag to the
commit:
> Reported-by: syzbot+7a9426...@syzkaller.appspotmail.com
>
> BUG: memory leak
> unreferenced object 0xffff88810f3c7980 (size 96):

Let's try the attached diff.

Fabio
scan_c_diff

Fabio M. De Francesco

unread,
Oct 26, 2021, 6:48:08 AM10/26/21
to syzkall...@googlegroups.com, syzbot

On Tuesday, October 26, 2021 12:33:23 AM CEST syzbot wrote:

> syzbot has found a reproducer for the following issue on:

>

> HEAD commit:    87066fdd2e30 Revert "mm/secretmem: use refcount_t instead ..

> git tree:       upstream

> console output: https://syzkaller.appspot.com/x/log.txt?x=16b55554b00000

> kernel config:  https://syzkaller.appspot.com/x/.config?x=d25eeb482b0f99b

> dashboard link: https://syzkaller.appspot.com/bug?extid=7a942657a255a9d9b18a

> compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=171cf464b00000

> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1396b19f300000

>

> IMPORTANT: if you fix the issue, please add the following tag to the commit:

> Reported-by: syzbot+7a9426...@syzkaller.appspotmail.com

>

> BUG: memory leak

> unreferenced object 0xffff88810f3c7980 (size 96):


Oh, I've sent the wrong diff and forgot to ask Syzbot to test it :(


#syz test:

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master



scan_c_diff

syzbot

unread,
Oct 26, 2021, 9:20:12 AM10/26/21
to fmdefr...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in __hw_addr_add_ex

BUG: memory leak
unreferenced object 0xffff88811c4ad980 (size 128):
comm "syz-executor.7", pid 7035, jiffies 4294944058 (age 96.630s)
hex dump (first 32 bytes):
b8 02 25 17 81 88 ff ff 22 01 00 00 00 00 ad de ..%.....".......
90 d9 4a 1c 81 88 ff ff 00 00 00 00 00 00 00 00 ..J.............
backtrace:
[<ffffffff83747c9e>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff83747c9e>] __hw_addr_create net/core/dev_addr_lists.c:29 [inline]
[<ffffffff83747c9e>] __hw_addr_add_ex+0x16e/0x410 net/core/dev_addr_lists.c:93
[<ffffffff837491fa>] __hw_addr_add net/core/dev_addr_lists.c:118 [inline]
[<ffffffff837491fa>] dev_addr_init+0x8a/0xe0 net/core/dev_addr_lists.c:537
[<ffffffff83733cd2>] alloc_netdev_mqs+0xd2/0x530 net/core/dev.c:10810
[<ffffffff828f847b>] __tun_chr_ioctl.isra.0+0x15eb/0x2080 drivers/net/tun.c:2690
[<ffffffff81599c8c>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81599c8c>] __do_sys_ioctl fs/ioctl.c:874 [inline]
[<ffffffff81599c8c>] __se_sys_ioctl fs/ioctl.c:860 [inline]
[<ffffffff81599c8c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:860
[<ffffffff84401ca5>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84401ca5>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888128484e00 (size 128):
comm "syz-executor.7", pid 7035, jiffies 4294944309 (age 94.140s)
hex dump (first 32 bytes):
b8 22 fe 1b 81 88 ff ff 22 01 00 00 00 00 ad de ."......".......
10 4e 48 28 81 88 ff ff 00 00 00 00 00 00 00 00 .NH(............
backtrace:
[<ffffffff83747c9e>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff83747c9e>] __hw_addr_create net/core/dev_addr_lists.c:29 [inline]
[<ffffffff83747c9e>] __hw_addr_add_ex+0x16e/0x410 net/core/dev_addr_lists.c:93
[<ffffffff837491fa>] __hw_addr_add net/core/dev_addr_lists.c:118 [inline]
[<ffffffff837491fa>] dev_addr_init+0x8a/0xe0 net/core/dev_addr_lists.c:537
[<ffffffff83733cd2>] alloc_netdev_mqs+0xd2/0x530 net/core/dev.c:10810
[<ffffffff82bbff98>] nsim_create+0x38/0x210 drivers/net/netdevsim/netdev.c:350
[<ffffffff82bc0ab7>] __nsim_dev_port_add+0x1a7/0x380 drivers/net/netdevsim/dev.c:1312
[<ffffffff82bc0cdd>] nsim_dev_port_add_all+0x4d/0xd0 drivers/net/netdevsim/dev.c:1372
[<ffffffff82bc2b7d>] nsim_dev_probe+0x75d/0x8b0 drivers/net/netdevsim/dev.c:1513
[<ffffffff82664d97>] call_driver_probe drivers/base/dd.c:517 [inline]
[<ffffffff82664d97>] really_probe.part.0+0xe7/0x380 drivers/base/dd.c:596
[<ffffffff8266513c>] really_probe drivers/base/dd.c:558 [inline]
[<ffffffff8266513c>] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:751
[<ffffffff8266523a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:781
[<ffffffff82665aa6>] __device_attach_driver+0xf6/0x140 drivers/base/dd.c:898
[<ffffffff82661d27>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427
[<ffffffff82665622>] __device_attach+0x122/0x260 drivers/base/dd.c:969
[<ffffffff82663996>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:487
[<ffffffff8265fd8b>] device_add+0x5fb/0xdf0 drivers/base/core.c:3396
[<ffffffff82bc8899>] nsim_bus_dev_new drivers/net/netdevsim/bus.c:435 [inline]
[<ffffffff82bc8899>] new_device_store+0x229/0x360 drivers/net/netdevsim/bus.c:302

BUG: memory leak
unreferenced object 0xffff888128421f00 (size 256):
comm "syz-executor.7", pid 7035, jiffies 4294944309 (age 94.140s)
hex dump (first 32 bytes):
ff 02 00 00 00 00 00 00 00 00 00 00 00 00 00 01 ................
00 b0 41 28 81 88 ff ff 00 30 48 28 81 88 ff ff ..A(.....0H(....
backtrace:
[<ffffffff83bbaeb1>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff83bbaeb1>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff83bbaeb1>] mca_alloc net/ipv6/mcast.c:880 [inline]
[<ffffffff83bbaeb1>] __ipv6_dev_mc_inc+0x201/0x5d0 net/ipv6/mcast.c:936
[<ffffffff83b77735>] ipv6_add_dev+0x435/0x750 net/ipv6/addrconf.c:466
[<ffffffff83b817b9>] addrconf_notify+0x419/0xde0 net/ipv6/addrconf.c:3505
[<ffffffff81273f7d>] notifier_call_chain kernel/notifier.c:83 [inline]
[<ffffffff81273f7d>] raw_notifier_call_chain+0x5d/0xa0 kernel/notifier.c:391
[<ffffffff8372d408>] call_netdevice_notifiers_info+0x78/0xe0 net/core/dev.c:1996
[<ffffffff83746ff4>] call_netdevice_notifiers_extack net/core/dev.c:2008 [inline]
[<ffffffff83746ff4>] call_netdevice_notifiers net/core/dev.c:2022 [inline]
[<ffffffff83746ff4>] register_netdevice+0x7a4/0x8d0 net/core/dev.c:10330
[<ffffffff82bc0106>] nsim_init_netdevsim drivers/net/netdevsim/netdev.c:317 [inline]
[<ffffffff82bc0106>] nsim_create+0x1a6/0x210 drivers/net/netdevsim/netdev.c:365
[<ffffffff82bc0ab7>] __nsim_dev_port_add+0x1a7/0x380 drivers/net/netdevsim/dev.c:1312
[<ffffffff82bc0cdd>] nsim_dev_port_add_all+0x4d/0xd0 drivers/net/netdevsim/dev.c:1372
[<ffffffff82bc2b7d>] nsim_dev_probe+0x75d/0x8b0 drivers/net/netdevsim/dev.c:1513
[<ffffffff82664d97>] call_driver_probe drivers/base/dd.c:517 [inline]
[<ffffffff82664d97>] really_probe.part.0+0xe7/0x380 drivers/base/dd.c:596
[<ffffffff8266513c>] really_probe drivers/base/dd.c:558 [inline]
[<ffffffff8266513c>] __driver_probe_device+0x10c/0x1e0 drivers/base/dd.c:751
[<ffffffff8266523a>] driver_probe_device+0x2a/0x120 drivers/base/dd.c:781
[<ffffffff82665aa6>] __device_attach_driver+0xf6/0x140 drivers/base/dd.c:898
[<ffffffff82661d27>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:427
[<ffffffff82665622>] __device_attach+0x122/0x260 drivers/base/dd.c:969



Tested on:

commit: 3906fe9b Linux 5.15-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11e12d54b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb7244ea6e0a3dd9
dashboard link: https://syzkaller.appspot.com/bug?extid=7a942657a255a9d9b18a
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=136bc7f8b00000

Siddh Raman Pant

unread,
Jul 13, 2022, 4:57:45 AM7/13/22
to syzbot+7a9426...@syzkaller.appspotmail.com, da...@davemloft.net, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com

Siddh Raman Pant

unread,
Jul 13, 2022, 4:59:04 AM7/13/22
to syzbot+7a942657a255a9d9b18a, davem, johannes, kuba, linux-kernel, linux-wireless, netdev, syzkaller-bugs

syzbot

unread,
Jul 13, 2022, 5:08:10 AM7/13/22
to co...@siddh.me, da...@davemloft.net, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in regulatory_init_db

BUG: memory leak
unreferenced object 0xffff8881450dc880 (size 64):
comm "swapper/0", pid 1, jiffies 4294937974 (age 80.900s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
ff ff ff ff 00 00 00 00 00 00 00 00 30 30 00 00 ............00..
backtrace:
[<ffffffff86ff026b>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff86ff026b>] kzalloc include/linux/slab.h:733 [inline]
[<ffffffff86ff026b>] regulatory_hint_core net/wireless/reg.c:3216 [inline]
[<ffffffff86ff026b>] regulatory_init_db+0x22f/0x2de net/wireless/reg.c:4277
[<ffffffff81000fe3>] do_one_initcall+0x63/0x2e0 init/main.c:1295
[<ffffffff86f4eb10>] do_initcall_level init/main.c:1368 [inline]
[<ffffffff86f4eb10>] do_initcalls init/main.c:1384 [inline]
[<ffffffff86f4eb10>] do_basic_setup init/main.c:1403 [inline]
[<ffffffff86f4eb10>] kernel_init_freeable+0x255/0x2cf init/main.c:1610
[<ffffffff845b427a>] kernel_init+0x1a/0x1c0 init/main.c:1499
[<ffffffff8100225f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

[ 88.


Tested on:

commit: b047602d Merge tag 'trace-v5.19-rc5' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13d4252a080000
kernel config: https://syzkaller.appspot.com/x/.config?x=689b5fe7168a1260
dashboard link: https://syzkaller.appspot.com/bug?extid=7a942657a255a9d9b18a
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Note: no patches were applied.

Siddh Raman Pant

unread,
Jul 13, 2022, 6:26:39 AM7/13/22
to syzbot, davem, johannes, kuba, linux-kernel, linux-wireless, netdev, syzkaller-bugs
Syzbot didn't give full log (did it crash?), so trying again.
On Wed, 13 Jul 2022 14:38:08 +0530 syzbot <syzbot+7a9426...@syzkaller.appspotmail.com> wrote

syzbot

unread,
Jul 13, 2022, 6:35:08 AM7/13/22
to co...@siddh.me, da...@davemloft.net, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
memory leak in regulatory_init_db

BUG: memory leak
unreferenced object 0xffff888145137a00 (size 64):
comm "swapper/0", pid 1, jiffies 4294937939 (age 68.850s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
ff ff ff ff 00 00 00 00 00 00 00 00 30 30 00 00 ............00..
backtrace:
[<ffffffff86ff026b>] kmalloc include/linux/slab.h:600 [inline]
[<ffffffff86ff026b>] kzalloc include/linux/slab.h:733 [inline]
[<ffffffff86ff026b>] regulatory_hint_core net/wireless/reg.c:3216 [inline]
[<ffffffff86ff026b>] regulatory_init_db+0x22f/0x2de net/wireless/reg.c:4277
[<ffffffff81000fe3>] do_one_initcall+0x63/0x2e0 init/main.c:1295
[<ffffffff86f4eb10>] do_initcall_level init/main.c:1368 [inline]
[<ffffffff86f4eb10>] do_initcalls init/main.c:1384 [inline]
[<ffffffff86f4eb10>] do_basic_setup init/main.c:1403 [inline]
[<ffffffff86f4eb10>] kernel_init_freeable+0x255/0x2cf init/main.c:1610
[<ffffffff845b427a>] kernel_init+0x1a/0x1c0 init/main.c:1499
[<ffffffff8100225f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

BUG: memory leak
unreferenced object 0xffff88810a760180 (size 96):
comm "kworker/u4:2", pid 43, jiffies 4294943904 (age 9.220s)
hex dump (first 32 bytes):
fa fd 93 53 ad e3 05 00 00 00 00 00 00 00 00 00 ...S............
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff840740b6>] cfg80211_inform_single_bss_frame_data+0x186/0x6a0 net/wireless/scan.c:2445
[<ffffffff8407461b>] cfg80211_inform_bss_frame_data+0x4b/0x460 net/wireless/scan.c:2506
[<ffffffff84115816>] ieee80211_bss_info_update+0x196/0x440 net/mac80211/scan.c:190
[<ffffffff841240e2>] ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline]
[<ffffffff841240e2>] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1610 [inline]
[<ffffffff841240e2>] ieee80211_ibss_rx_queued_mgmt+0x7d2/0x11a0 net/mac80211/ibss.c:1639
[<ffffffff84126b81>] ieee80211_iface_process_skb net/mac80211/iface.c:1527 [inline]
[<ffffffff84126b81>] ieee80211_iface_work+0x601/0x780 net/mac80211/iface.c:1581
[<ffffffff8127130f>] process_one_work+0x2bf/0x600 kernel/workqueue.c:2289
[<ffffffff81271c39>] worker_thread+0x59/0x5b0 kernel/workqueue.c:2436
[<ffffffff8127b955>] kthread+0x125/0x160 kernel/kthread.c:376
[<ffffffff8100225f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

BUG: memory leak
unreferenced object 0xffff88810a760100 (size 96):
comm "kworker/u4:0", pid 8, jiffies 4294943986 (age 8.400s)
hex dump (first 32 bytes):
36 80 a0 53 ad e3 05 00 00 00 00 00 00 00 00 00 6..S............
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff840740b6>] cfg80211_inform_single_bss_frame_data+0x186/0x6a0 net/wireless/scan.c:2445
[<ffffffff8407461b>] cfg80211_inform_bss_frame_data+0x4b/0x460 net/wireless/scan.c:2506
[<ffffffff84115816>] ieee80211_bss_info_update+0x196/0x440 net/mac80211/scan.c:190
[<ffffffff841240e2>] ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline]
[<ffffffff841240e2>] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1610 [inline]
[<ffffffff841240e2>] ieee80211_ibss_rx_queued_mgmt+0x7d2/0x11a0 net/mac80211/ibss.c:1639
[<ffffffff84126b81>] ieee80211_iface_process_skb net/mac80211/iface.c:1527 [inline]
[<ffffffff84126b81>] ieee80211_iface_work+0x601/0x780 net/mac80211/iface.c:1581
[<ffffffff8127130f>] process_one_work+0x2bf/0x600 kernel/workqueue.c:2289
[<ffffffff81271c39>] worker_thread+0x59/0x5b0 kernel/workqueue.c:2436
[<ffffffff8127b955>] kthread+0x125/0x160 kernel/kthread.c:376
[<ffffffff8100225f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

BUG: memory leak
unreferenced object 0xffff888114cb9100 (size 96):
comm "kworker/u4:3", pid 53, jiffies 4294944017 (age 8.090s)
hex dump (first 32 bytes):
95 32 a5 53 ad e3 05 00 00 00 00 00 00 00 00 00 .2.S............
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff840740b6>] cfg80211_inform_single_bss_frame_data+0x186/0x6a0 net/wireless/scan.c:2445
[<ffffffff8407461b>] cfg80211_inform_bss_frame_data+0x4b/0x460 net/wireless/scan.c:2506
[<ffffffff84115816>] ieee80211_bss_info_update+0x196/0x440 net/mac80211/scan.c:190
[<ffffffff841240e2>] ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline]
[<ffffffff841240e2>] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1610 [inline]
[<ffffffff841240e2>] ieee80211_ibss_rx_queued_mgmt+0x7d2/0x11a0 net/mac80211/ibss.c:1639
[<ffffffff84126b81>] ieee80211_iface_process_skb net/mac80211/iface.c:1527 [inline]
[<ffffffff84126b81>] ieee80211_iface_work+0x601/0x780 net/mac80211/iface.c:1581
[<ffffffff8127130f>] process_one_work+0x2bf/0x600 kernel/workqueue.c:2289
[<ffffffff81271c39>] worker_thread+0x59/0x5b0 kernel/workqueue.c:2436
[<ffffffff8127b955>] kthread+0x125/0x160 kernel/kthread.c:376
[<ffffffff8100225f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

BUG: memory leak
unreferenced object 0xffff888114afa500 (size 96):
comm "kworker/u4:3", pid 53, jiffies 4294944037 (age 7.890s)
hex dump (first 32 bytes):
1c 46 a8 53 ad e3 05 00 00 00 00 00 00 00 00 00 .F.S............
00 00 00 00 00 00 00 00 28 00 00 00 01 00 06 10 ........(.......
backtrace:
[<ffffffff840740b6>] cfg80211_inform_single_bss_frame_data+0x186/0x6a0 net/wireless/scan.c:2445
[<ffffffff8407461b>] cfg80211_inform_bss_frame_data+0x4b/0x460 net/wireless/scan.c:2506
[<ffffffff84115816>] ieee80211_bss_info_update+0x196/0x440 net/mac80211/scan.c:190
[<ffffffff841240e2>] ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline]
[<ffffffff841240e2>] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1610 [inline]
[<ffffffff841240e2>] ieee80211_ibss_rx_queued_mgmt+0x7d2/0x11a0 net/mac80211/ibss.c:1639
[<ffffffff84126b81>] ieee80211_iface_process_skb net/mac80211/iface.c:1527 [inline]
[<ffffffff84126b81>] ieee80211_iface_work+0x601/0x780 net/mac80211/iface.c:1581
[<ffffffff8127130f>] process_one_work+0x2bf/0x600 kernel/workqueue.c:2289
[<ffffffff81271c39>] worker_thread+0x59/0x5b0 kernel/workqueue.c:2436
[<ffffffff8127b955>] kthread+0x125/0x160 kernel/kthread.c:376
[<ffffffff8100225f>] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

[ 75.59820


Tested on:

commit: b047602d Merge tag 'trace-v5.19-rc5' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10cfa478080000
Reply all
Reply to author
Forward
0 new messages