No description
Find a file
Masahiro Yamada 8887047de3 kconfig: fix memory leak from range properties
[ Upstream commit ae1eff0349 ]

Currently, sym_validate_range() duplicates the range string using
xstrdup(), which is overwritten by a subsequent sym_calc_value() call.
It results in a memory leak.

Instead, only the pointer should be copied.

Below is a test case, with a summary from Valgrind.

[Test Kconfig]

  config FOO
          int "foo"
          range 10 20

[Test .config]

  CONFIG_FOO=0

[Before]

  LEAK SUMMARY:
     definitely lost: 3 bytes in 1 blocks
     indirectly lost: 0 bytes in 0 blocks
       possibly lost: 0 bytes in 0 blocks
     still reachable: 17,465 bytes in 21 blocks
          suppressed: 0 bytes in 0 blocks

[After]

  LEAK SUMMARY:
     definitely lost: 0 bytes in 0 blocks
     indirectly lost: 0 bytes in 0 blocks
       possibly lost: 0 bytes in 0 blocks
     still reachable: 17,462 bytes in 20 blocks
          suppressed: 0 bytes in 0 blocks

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 18:26:56 +01:00
arch s390/cmma: fix detection of DAT pages 2023-12-08 08:46:14 +01:00
block block: fix use-after-free of q->q_usage_counter 2023-10-10 21:53:36 +02:00
certs
crypto crypto: pcrypt - Fix hungtask for PADATA_RESET 2023-11-28 16:54:51 +00:00
Documentation driver core: Move the "removable" attribute from USB to core 2023-12-08 08:46:15 +01:00
drivers tg3: Increment tx_dropped in tg3_tso_bug() 2023-12-13 18:26:56 +01:00
fs smb3: fix caching of ctime on setxattr 2023-12-08 08:46:15 +01:00
include hrtimers: Push pending hrtimers away from outgoing CPU earlier 2023-12-13 18:26:56 +01:00
init x86/mm: Initialize text poking earlier 2023-08-08 19:57:39 +02:00
io_uring io_uring: fix off-by one bvec index 2023-12-08 08:46:11 +01:00
ipc
kernel hrtimers: Push pending hrtimers away from outgoing CPU earlier 2023-12-13 18:26:56 +01:00
lib parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes 2023-12-08 08:46:12 +01:00
LICENSES
mm mm: kmem: drop __GFP_NOFAIL when allocating objcg vectors 2023-11-28 16:55:01 +00:00
net netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test 2023-12-13 18:26:56 +01:00
samples samples/hw_breakpoint: fix building without module unloading 2023-09-23 11:01:09 +02:00
scripts kconfig: fix memory leak from range properties 2023-12-13 18:26:56 +01:00
security ima: annotate iint mutex to avoid lockdep false positive warnings 2023-12-08 08:46:15 +01:00
sound ASoC: SOF: sof-pci-dev: Fix community key quirk detection 2023-12-08 08:46:14 +01:00
tools selftests/net: mptcp: fix uninitialized variable warnings 2023-12-08 08:46:13 +01:00
usr
virt KVM: fix memoryleak in kvm_init() 2023-04-05 11:23:43 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Remove DECnet support from kernel 2023-06-21 15:45:38 +02:00
Makefile Linux 5.10.203 2023-12-08 08:46:16 +01:00
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.

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.