Wang Hai
ea2fce88d2
mld: fix memory leak in ipv6_mc_destroy_dev()
...
Commit a84d01647989 ("mld: fix memory leak in mld_del_delrec()") fixed
the memory leak of MLD, but missing the ipv6_mc_destroy_dev() path, in
which mca_sources are leaked after ma_put().
Using ip6_mc_clear_src() to take care of the missing free.
BUG: memory leak
unreferenced object 0xffff8881113d3180 (size 64):
comm "syz-executor071", pid 389, jiffies 4294887985 (age 17.943s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 ff 02 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 ................
backtrace:
[<000000002cbc483c>] kmalloc include/linux/slab.h:555 [inline]
[<000000002cbc483c>] kzalloc include/linux/slab.h:669 [inline]
[<000000002cbc483c>] ip6_mc_add1_src net/ipv6/mcast.c:2237 [inline]
[<000000002cbc483c>] ip6_mc_add_src+0x7f5/0xbb0 net/ipv6/mcast.c:2357
[<0000000058b8b1ff>] ip6_mc_source+0xe0c/0x1530 net/ipv6/mcast.c:449
[<000000000bfc4fb5>] do_ipv6_setsockopt.isra.12+0x1b2c/0x3b30 net/ipv6/ipv6_sockglue.c:754
[<00000000e4e7a722>] ipv6_setsockopt+0xda/0x150 net/ipv6/ipv6_sockglue.c:950
[<0000000029260d9a>] rawv6_setsockopt+0x45/0x100 net/ipv6/raw.c:1081
[<000000005c1b46f9>] __sys_setsockopt+0x131/0x210 net/socket.c:2132
[<000000008491f7db>] __do_sys_setsockopt net/socket.c:2148 [inline]
[<000000008491f7db>] __se_sys_setsockopt net/socket.c:2145 [inline]
[<000000008491f7db>] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2145
[<00000000c7bc11c5>] do_syscall_64+0xa1/0x530 arch/x86/entry/common.c:295
[<000000005fb7a3f3>] entry_SYSCALL_64_after_hwframe+0x49/0xb3
Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-15 13:29:39 -07:00
..
2020-04-29 12:01:31 -07:00
2020-06-14 01:57:21 +09:00
2020-04-28 12:50:37 -07:00
2020-06-03 16:27:18 -07:00
2019-04-27 17:07:21 -04:00
2020-05-29 13:02:33 -07:00
2020-04-28 11:28:36 +02:00
2020-04-28 12:50:37 -07:00
2020-05-12 18:12:40 -07:00
2019-12-04 12:27:12 -08:00
2020-05-31 17:48:46 -07:00
2020-04-28 11:28:36 +02:00
2019-07-27 14:23:48 -07:00
2019-05-30 11:26:32 -07:00
2020-03-29 22:30:57 -07:00
2019-10-04 11:10:56 -07:00
2019-10-04 11:10:56 -07:00
2019-05-21 10:50:45 +02:00
2020-04-07 18:25:10 -07:00
2019-12-24 22:28:54 -08:00
2019-10-30 13:24:25 -07:00
2018-10-24 14:18:16 -07:00
2020-05-24 13:47:27 -07:00
2020-05-19 07:07:50 -05:00
2020-02-20 10:00:19 -08:00
2020-02-13 14:19:00 -08:00
2020-03-30 13:45:04 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-02-24 13:31:42 -08:00
2020-05-22 15:49:31 -07:00
2020-06-01 14:57:14 -07:00
2020-04-28 11:28:36 +02:00
2020-05-21 17:25:50 -07:00
2020-04-28 11:28:36 +02:00
2020-06-04 15:39:32 -07:00
2020-06-14 01:57:21 +09:00
2020-03-29 22:30:57 -07:00
2019-06-05 17:37:07 +02:00
2020-06-15 13:29:39 -07:00
2019-06-06 08:34:50 +02:00
2020-05-01 17:02:27 -07:00
2019-10-18 10:02:37 -07:00
2019-05-21 10:50:45 +02:00
2019-09-12 11:20:33 +01:00
2019-06-07 11:00:14 -07:00
2019-05-30 11:26:32 -07:00
2020-05-18 17:35:02 -07:00
2019-08-08 15:55:10 -07:00
2020-05-22 14:00:38 -07:00
2020-04-02 06:57:34 -07:00
2020-04-18 15:04:27 -07:00
2020-05-08 15:32:17 +10:00
2020-06-04 15:39:32 -07:00
2020-06-04 15:39:32 -07:00
2020-06-04 15:39:32 -07:00
2020-05-19 15:45:12 -07:00
2020-01-29 17:45:20 +01:00
2020-04-27 02:07:40 -04:00
2020-06-01 15:51:25 -07:00
2019-05-30 11:26:32 -07:00
2020-05-22 15:49:30 -07:00
2019-01-17 15:01:08 -08:00
2020-01-27 11:00:21 +01:00
2020-03-30 13:45:04 -07:00
2019-05-30 11:26:32 -07:00
2020-05-06 09:40:08 +02:00
2020-05-06 09:40:08 +02:00
2019-12-24 22:28:54 -08:00
2020-04-28 11:28:36 +02:00
2020-05-06 09:40:08 +02:00
2020-02-27 10:17:41 +01:00