Liu Shixin
b8f6b0522c
netlabel: Fix memory leak in netlbl_mgmt_add_common
...
Hulk Robot reported memory leak in netlbl_mgmt_add_common.
The problem is non-freed map in case of netlbl_domhsh_add() failed.
BUG: memory leak
unreferenced object 0xffff888100ab7080 (size 96):
comm "syz-executor537", pid 360, jiffies 4294862456 (age 22.678s)
hex dump (first 32 bytes):
05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 ................
backtrace:
[<0000000008b40026>] netlbl_mgmt_add_common.isra.0+0xb2a/0x1b40
[<000000003be10950>] netlbl_mgmt_add+0x271/0x3c0
[<00000000c70487ed>] genl_family_rcv_msg_doit.isra.0+0x20e/0x320
[<000000001f2ff614>] genl_rcv_msg+0x2bf/0x4f0
[<0000000089045792>] netlink_rcv_skb+0x134/0x3d0
[<0000000020e96fdd>] genl_rcv+0x24/0x40
[<0000000042810c66>] netlink_unicast+0x4a0/0x6a0
[<000000002e1659f0>] netlink_sendmsg+0x789/0xc70
[<000000006e43415f>] sock_sendmsg+0x139/0x170
[<00000000680a73d7>] ____sys_sendmsg+0x658/0x7d0
[<0000000065cbb8af>] ___sys_sendmsg+0xf8/0x170
[<0000000019932b6c>] __sys_sendmsg+0xd3/0x190
[<00000000643ac172>] do_syscall_64+0x37/0x90
[<000000009b79d6dc>] entry_SYSCALL_64_after_hwframe+0x44/0xae
Fixes: 63c416887437 ("netlabel: Add network address selectors to the NetLabel/LSM domain mapping")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-15 11:19:04 -07:00
..
2021-06-08 19:27:57 -07:00
2021-06-10 14:08:09 -07:00
2021-06-07 13:01:52 -07:00
2021-06-04 14:41:28 -07:00
2021-06-07 13:01:52 -07:00
2021-06-14 13:15:22 -07:00
2021-06-10 14:08:49 -07:00
2021-06-14 12:54:43 -07:00
2021-06-07 14:08:30 -07:00
2021-06-14 12:46:00 -07:00
2021-06-12 13:06:33 -07:00
2021-06-07 14:08:30 -07:00
2021-06-08 16:31:25 -07:00
2021-06-07 13:01:52 -07:00
2021-06-07 14:08:30 -07:00
2021-06-09 14:50:35 -07:00
2021-06-15 11:19:04 -07:00
2021-06-07 13:01:52 -07:00
2021-06-15 10:26:51 -07:00
2021-06-10 13:48:43 -07:00
2021-06-07 14:11:47 -07:00
2021-06-10 13:46:38 -07:00
2021-06-11 13:32:47 -07:00
2021-06-10 14:08:09 -07:00
2021-06-03 15:13:56 -07:00
2021-06-11 12:55:28 -07:00