Wang Hai
fa0d7e09da
mld: fix memory leak in ipv6_mc_destroy_dev()
...
[ Upstream commit ea2fce88d2fd678ed9d45354ff49b73f1d5615dd ]
Commit a84d016479 ("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: 1666d49e1d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-30 15:36:43 -04:00
arch
kretprobe: Prevent triggering kretprobe from within kprobe_flush_task
2020-06-24 17:50:52 +02:00
block
block/bio-integrity: don't free 'buf' if bio_integrity_add_page() failed
2020-06-30 15:36:43 -04:00
certs
PKCS#7: Refactor verify_pkcs7_signature()
2019-08-05 18:40:18 -04:00
crypto
crypto: algboss - don't wait during notifier callback
2020-06-24 17:50:51 +02:00
Documentation
dt-bindings: display: mediatek: control dpi pins mode to avoid leakage
2020-06-22 09:30:58 +02:00
drivers
ibmveth: Fix max MTU limit
2020-06-30 15:36:43 -04:00
fs
f2fs: avoid utf8_strncasecmp() with unstable name
2020-06-24 17:50:50 +02:00
include
kretprobe: Prevent triggering kretprobe from within kprobe_flush_task
2020-06-24 17:50:52 +02:00
init
x86: Fix early boot crash on gcc-10, third try
2020-05-20 08:20:34 +02:00
ipc
ipc/util.c: sysvipc_find_ipc() incorrectly updates position index
2020-05-20 08:20:16 +02:00
kernel
kretprobe: Prevent triggering kretprobe from within kprobe_flush_task
2020-06-24 17:50:52 +02:00
lib
lib/zlib: remove outdated and incorrect pre-increment optimization
2020-06-24 17:50:39 +02:00
LICENSES
LICENSES: Rename other to deprecated
2019-05-03 06:34:32 -06:00
mm
mm: call cond_resched() from deferred_init_memmap()
2020-06-22 09:31:14 +02:00
net
mld: fix memory leak in ipv6_mc_destroy_dev()
2020-06-30 15:36:43 -04:00
samples
samples: bpf: Fix build error
2020-06-03 08:21:15 +02:00
scripts
scripts: headers_install: Exit with error on config leak
2020-06-24 17:50:33 +02:00
security
selinux: fix double free
2020-06-24 17:50:48 +02:00
sound
ASoC: rt5645: Add platform-data for Asus T101HA
2020-06-24 17:50:42 +02:00
tools
perf stat: Fix NULL pointer dereference
2020-06-24 17:50:45 +02:00
usr
initramfs: restore default compression behavior
2020-04-08 09:08:38 +02:00
virt
KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
2020-06-17 16:40:38 +02:00
.clang-format
clang-format: Update with the latest for_each macro list
2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore
Opt out of scripts/get_maintainer.pl
2019-05-16 10:53:40 -07:00
.gitattributes
.gitignore
Modules updates for v5.4
2019-09-22 10:34:46 -07:00
.mailmap
ARM: SoC fixes
2019-11-10 13:41:59 -08:00
COPYING
COPYING: use the new text with points to the license files
2018-03-23 12:41:45 -06:00
CREDITS
MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer
2019-10-10 08:12:51 -07:00
Kbuild
kbuild: do not descend to ./Kbuild when cleaning
2019-08-21 21:03:58 +09:00
Kconfig
docs: kbuild: convert docs to ReST and rename to *.rst
2019-06-14 14:21:21 -06:00
MAINTAINERS
MAINTAINERS: Update drm/i915 bug filing URL
2020-02-28 17:22:19 +01:00
Makefile
Linux 5.4.49
2020-06-24 17:50:53 +02:00
README
Drop all 00-INDEX files from Documentation/
2018-09-09 15:08:58 -06:00