CVE-2025-21857

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-21857
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21857.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-21857
Downstream
Related
Published
2025-03-12T10:15:18Z
Modified
2025-03-13T21:15:46Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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

net/sched: cls_api: fix error handling causing NULL dereference

tcfextsmisscookiebasealloc() calls xaalloccyclic() which can return 1 if the allocation succeeded after wrapping. This was treated as an error, with value 1 returned to caller tcfextsinitex() which sets exts->actions to NULL and returns 1 to caller fl_change().

flchange() treats err == 1 as success, calling tcfextsvalidateex() which calls tcfactioninit() with exts->actions as argument, where it is dereferenced.

Example trace:

BUG: kernel NULL pointer dereference, address: 0000000000000000 CPU: 114 PID: 16151 Comm: handler114 Kdump: loaded Not tainted 5.14.0-503.16.1.el95.x8664 #1 RIP: 0010:tcfactioninit+0x1f8/0x2c0 Call Trace: tcfactioninit+0x1f8/0x2c0 tcfextsvalidateex+0x175/0x190 flchange+0x537/0x1120 [cls_flower]

References

Affected packages

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.12.17-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}