CVE Database›Document archive›CVE-2025-39847

CVE-2025-39847

kernel: ppp: fix memory leak in pad_compress_skb

Loading…

Severity

Moderate

Red Hat Product Security

5.3

CVSS 3.1

Review impact separately from score.

Published · September 19, 2025

Updated · June 30, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

ppp: fix memory leak in pad_compress_skb

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.

Statement

A memory leak in PPP’s pad_compress_skb() could occur when alloc_skb() fails: the function returned NULL while the original skb reference was lost by the caller, leaking memory. The fix aligns the function with realloc semantics (only free on success) and updates the caller to use a temporary new_skb, preventing reference loss. Practically, impact is limited to availability on systems using PPP compression (e.g., MPPE) under allocation/pressure failures.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 5.3
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

CWE-772 · Missing Release of Resource after Effective Lifetime