Go to file
Qingfang Deng 9ca6a040f7 ppp: fix memory leak in pad_compress_skb
[ Upstream commit 4844123fe0 ]

If alloc_skb() fails in pad_compress_skb(), it returns NULL without
releasing the old skb. The caller does:

    skb = pad_compress_skb(ppp, skb);
    if (!skb)
        goto drop;

drop:
    kfree_skb(skb);

When pad_compress_skb() returns NULL, the reference to the old skb is
lost and kfree_skb(skb) ends up doing nothing, leading to a memory leak.

Align pad_compress_skb() semantics with realloc(): only free the old
skb if allocation and compression succeed.  At the call site, use the
new_skb variable so the original skb is not lost when pad_compress_skb()
fails.

Fixes: b3f9b92a6e ("[PPP]: add PPP MPPE encryption module")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://patch.msgid.link/20250903100726.269839-1-dqfext@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-09-09 18:43:58 +02:00
arch powerpc: boot: Remove leading zero in label in udelay() 2025-09-09 18:43:56 +02:00
block
certs
crypto crypto: algif_hash - fix double free in hash_accept 2025-06-04 14:32:35 +02:00
Documentation Documentation: ACPI: Fix parent device references 2025-08-28 16:21:23 +02:00
drivers ppp: fix memory leak in pad_compress_skb 2025-09-09 18:43:58 +02:00
fs efivarfs: Fix slab-out-of-bounds in efivarfs_d_compare 2025-09-04 14:05:55 +02:00
include atm: atmtcp: Prevent arbitrary write in atmtcp_recv_control(). 2025-09-04 14:05:54 +02:00
init bpfilter: match bit size of bpfilter_umh to that of the kernel 2025-07-17 18:24:51 +02:00
ipc ipc: fix to protect IPCS lookups using RCU 2025-06-27 11:02:52 +01:00
kernel ftrace: Fix potential warning in trace_printk_seq during ftrace_dump 2025-09-04 14:05:53 +02:00
lib lib: test_objagg: Set error message in check_expect_hints_stats() 2025-07-17 18:24:56 +02:00
LICENSES
mm mm: perform the mapping_map_writable() check after call_mmap() 2025-08-28 16:21:36 +02:00
net net: atm: fix memory leak in atm_register_sysfs when device_register fail 2025-09-09 18:43:58 +02:00
samples samples: mei: Fix building on musl libc 2025-08-28 16:21:19 +02:00
scripts kbuild: Add KBUILD_CPPFLAGS to as-option invocation 2025-08-28 16:21:33 +02:00
security securityfs: don't pin dentries twice, once is enough... 2025-08-28 16:21:24 +02:00
sound ALSA: usb-audio: Use correct sub-type for UAC3 feature unit validation 2025-08-28 16:21:37 +02:00
tools act_mirred: use the backlog for nested calls to mirred ingress 2025-08-28 16:21:36 +02:00
usr kbuild: hdrcheck: fix cross build with clang 2025-07-17 18:24:51 +02:00
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS platform: Add Surface platform directory 2025-06-27 11:02:56 +01:00
Makefile Linux 5.4.298 2025-09-04 14:05:56 +02: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.