Go to file
Zhang Changzhong 0939d7817d xfrm6: fix inet6_dev refcount underflow problem
[ Upstream commit cc9b364bb1 ]

There are race conditions that may lead to inet6_dev refcount underflow
in xfrm6_dst_destroy() and rt6_uncached_list_flush_dev().

One of the refcount underflow bugs is shown below:
	(cpu 1)                	|	(cpu 2)
xfrm6_dst_destroy()             |
  ...                           |
  in6_dev_put()                 |
				|  rt6_uncached_list_flush_dev()
  ...				|    ...
				|    in6_dev_put()
  rt6_uncached_list_del()       |    ...
  ...                           |

xfrm6_dst_destroy() calls rt6_uncached_list_del() after in6_dev_put(),
so rt6_uncached_list_flush_dev() has a chance to call in6_dev_put()
again for the same inet6_dev.

Fix it by moving in6_dev_put() after rt6_uncached_list_del() in
xfrm6_dst_destroy().

Fixes: 510c321b55 ("xfrm: reuse uncached_list to track xdsts")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:17:03 +02:00
Documentation Documentation: security-bugs.rst: clarify CVE handling 2023-08-11 11:45:34 +02:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
arch s390/pci: fix iommu bitmap allocation 2023-10-25 11:17:02 +02:00
block block: fix signed int overflow in Amiga partition support 2023-08-30 16:31:46 +02:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-25 11:49:16 +02:00
crypto X.509: if signature is unsupported skip validation 2023-09-23 10:48:11 +02:00
drivers phy: mapphone-mdm6600: Fix runtime PM for remove 2023-10-25 11:17:02 +02:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs btrfs: fix some -Wmaybe-uninitialized warnings in ioctl.c 2023-10-25 11:16:59 +02:00
include perf: Disallow mis-matched inherited group reads 2023-10-25 11:17:02 +02:00
init init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init() 2023-08-08 19:49:18 +02:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:18:35 +01:00
kernel perf: Disallow mis-matched inherited group reads 2023-10-25 11:17:02 +02:00
lib kobject: Add sanity check for kset->kobj.ktype in kset_register() 2023-09-23 10:48:17 +02:00
mm treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
net xfrm6: fix inet6_dev refcount underflow problem 2023-10-25 11:17:03 +02:00
samples samples/bpf: Fix buffer overflow in tcp_basertt 2023-08-11 11:45:03 +02:00
scripts modpost: add missing else to the "of" check 2023-10-10 21:45:01 +02:00
security smack: Record transmuting in smk_transmuted 2023-10-10 21:44:59 +02:00
sound ASoC: pxa: fix a memory leak in probe() 2023-10-25 11:17:02 +02:00
tools cpupower: add Makefile dependencies for install targets 2023-10-10 21:45:01 +02:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt KVM: arm64: vgic: Fix exit condition in scan_its_table() 2022-11-03 23:52:24 +09:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
COPYING
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS clocksource/drivers: Unify the names to timer-* format 2023-08-11 11:45:02 +02:00
Makefile Linux 4.19.296 2023-10-10 21:45:02 +02:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.