CVE-2025-38651: landlock: Fix warning from KUnit tests
In the Linux kernel, the following vulnerability has been resolved:
landlock: Fix warning from KUnit tests
get_id_range() expects a positive value as first argument but
get_random_u8() can return 0. Fix this by clamping it.
Validated by running the test in a for loop for 1000 times.
Note that MAX() is wrong as it is only supposed to be used for
constants, but max() is good here.
[..] ok 9 test_range2_rand1
[..] ok 10 test_range2_rand2
[..] ok 11 test_range2_rand15
[..] ------------[ cut here ]------------
[..] WARNING: CPU: 6 PID: 104 at security/landlock/id.c:99 test_range2_rand16 (security/landlock/id.c:99 (discriminator 1) security/landlock/id.c:234 (discriminator 1))
[..] Modules linked in:
[..] CPU: 6 UID: 0 PID: 104 Comm: kunit_try_catch Tainted: G N 6.16.0-rc1-dev-00001-g314a2f98b65f #1 PREEMPT(undef)
[..] Tainted: [N]=TEST
[..] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[..] RIP: 0010:test_range2_rand16 (security/landlock/id.c:99 (discriminator 1) security/landlock/id.c:234 (discriminator 1))
[..] Code: 49 c7 c0 10 70 30 82 4c 89 ff 48 c7 c6 a0 63 1e 83 49 c7 45 a0 e0 63 1e 83 e8 3f 95 17 00 e9 1f ff ff ff 0f 0b e9 df fd ff ff <0f> 0b ba 01 00 00 00 e9 68 fe ff ff 49 89 45 a8 49 8d 4d a0 45 31
[..] RSP: 0000:ffff888104eb7c78 EFLAGS: 00010246
[..] RAX: 0000000000000000 RBX: 000000000870822c RCX: 0000000000000000
^^^^^^^^^^^^^^^^
[..]
[..] Call Trace:
[..]
[..] ---[ end trace 0000000000000000 ]---
[..] ok 12 test_range2_rand16
[..] # landlock_id: pass:12 fail:0 skip:0 total:12
[..] # Totals: pass:12 fail:0 skip:0 total:12
[..] ok 1 landlock_id
[mic: Minor cosmetic improvements]
Security readout for executives and security teams
Plain-English summary
This CVE covers a Linux kernel Landlock issue found by KUnit testing. A randomized test could pass zero where a positive value was expected, causing a kernel warning. Sources do not describe data loss, privilege escalation, remote access, or active exploitation.
Executive priority
Treat this as low urgency unless affected kernels are broadly deployed in sensitive environments. Fold remediation into normal kernel maintenance and vendor patch cycles, while monitoring for any later severity clarification.
Technical view
In Landlock ID range handling, get_id_range() expects a positive first argument, while get_random_u8() can return 0. The referenced fix clamps the randomized value and was validated by repeating the KUnit test 1000 times. No CVSS, CWE, or runtime exploit details are provided.
Likely exposure
Exposure appears limited to Linux kernels in the CVE affected range, including listed 6.15 and related stable versions. Business exposure depends on whether affected kernels are deployed and whether Landlock code paths are relevant.
Exploitation context
The bundle shows no KEV listing and no cited evidence of active exploitation. The available description centers on a KUnit warning during randomized kernel tests, not a documented real-world attack path.
Researcher notes
Evidence is incomplete for impact: the CVE has no CVSS vector, CWE, or exploit narrative. The strongest source detail indicates a test-triggered warning caused by zero input to a positive-range helper, fixed by clamping.
Mitigation direction
Inventory Linux kernel versions against the CVE affected list.
Review vendor kernel advisories for fixed package versions.
Prioritize routine kernel updates where affected versions are present.
Track the referenced stable kernel commits in downstream distributions.
Validation and detection
Confirm deployed kernel versions on Linux assets.
Check whether vendor packages include the referenced stable fixes.
Review kernel logs for related Landlock warnings if testing affected kernels.
Run relevant kernel or vendor regression tests after updating.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38651 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
0ADP providers
4Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Aug 22, 2025, 16:00 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.