CVE-2025-21899 tracing: Fix bad hist from corrupting named_triggers list
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- Linux KernelUbuntuDebian
Description
In the Linux kernel, the following vulnerability has been resolved:
tracing: Fix bad hist from corrupting named_triggers list
The following commands causes a crash:
~# cd /sys/kernel/tracing/events/rcu/rcu_callback
~# echo 'hist:name=bad:keys=common_pid:onmax(bogus).save(common_pid)' > trigger
bash: echo: write error: Invalid argument
~# echo 'hist:name=bad:keys=common_pid' > trigger
Because the following occurs:
event_trigger_write() {
trigger_process_regex() {
event_hist_trigger_parse() {
data = event_trigger_alloc(..);
event_trigger_register(.., data) {
cmd_ops->reg(.., data, ..) [hist_register_trigger()] {
data->ops->init() [event_hist_trigger_init()] {
save_named_trigger(name, data) {
list_add(&data->named_list, &named_triggers);
}
}
}
}
ret = create_actions(); (return -EINVAL)
if (ret)
goto out_unreg;
[..]
ret = hist_trigger_enable(data, ...) {
list_add_tail_rcu(&data->list, &file->triggers); <<<---- SKIPPED!!! (this is important!)
[..]
out_unreg:
event_hist_unregister(.., data) {
cmd_ops->unreg(.., data, ..) [hist_unregister_trigger()] {
list_for_each_entry(iter, &file->triggers, list) {
if (!hist_trigger_match(data, iter, named_data, false)) <- never matches
continue;
[..]
test = iter;
}
if (test && test->ops->free) <<<-- test is NULL
test->ops->free(test) [event_hist_trigger_free()] {
[..]
if (data->name)
del_named_trigger(data) {
list_del(&data->named_list); <<<<-- NEVER gets removed!
}
}
}
}
[..]
kfree(data); <<<-- frees item but it is still on list
The next time a hist with name is registered, it causes an u-a-f bug and
the kernel can crash.
Move the code around such that if event_trigger_register() succeeds, the
next thing called is hist_trigger_enable() which adds it to the list.
A bunch of actions is called if get_named_trigger_data() returns false.
But that doesn't need to be called after event_trigger_register(), so it
can be moved up, allowing event_trigger_register() to be called just
before hist_trigger_enable() keeping them together and allowing the
file->triggers to be properly populated.
Upgrade path
11 packages: 6 fixed, 5 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| cbl-mariner kernel(CBL-Mariner 2.0) | All versions | No fix listed | No fix yet |
| Microsoft cbl2 kernel 5.15.202.1-1 | All versions | No fix listed | No fix yet |
| ubuntu/linux(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/linux-kvm(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/linux-raspi(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| debian/linux(Debian 12) | < 6.1.133-1; = 6.1.27-1; = 6.1.37-1; = 6.1.38-1 +33 more | 6.1.133-1 | Fixed |
| debian/linux(Debian 13) | < 6.12.19-1 | 6.12.19-1 | Fixed |
| debian/linux(Debian 14) | < 6.12.19-1 | 6.12.19-1 | Fixed |
| Linux kernel | < 6.1.130; < 6.6.81; < 6.12.18; < 6.13.6 +15 more | 5ae1b18f05ee2b849dc03b6c15d7da0c1c6efa77, 6.1.130, 6.6.81, 6.12.18, 6.13.6, 6.14, 6f86bdeab633a56d5c6dccf1a2c5989b6a5e323e, 43b254d46c740bf9dbe65709afa021dd726dfa99, 435d2964af815aae456db554c62963b4515f19d0, f1ae50cfb818ce1ac7a674406dfadb7653e2552d | Fixed |
| ubuntu/linux(Ubuntu 24.04) | < 6.8.0-84.84 | 6.8.0-84.84 | Fixed |
| ubuntu/linux-raspi(Ubuntu 24.04) | < 6.8.0-1039.43 | 6.8.0-1039.43 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| cbl-mariner kernel(CBL-Mariner:2.0) | All versions | No fix listed |
| Microsoft cbl2 kernel 5.15.202.1-1 | All versions | No fix listed |
| debian/linux(Debian:12) | < 6.1.133-1 | 6.1.133-1 |
| debian/linux(Debian:12) | = 6.1.106-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.106-2 | No fix listed |
| debian/linux(Debian:12) | = 6.1.106-3 | No fix listed |
| debian/linux(Debian:12) | = 6.1.112-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.115-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.119-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.123-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.124-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.128-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.129-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.27-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.37-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-2 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-2~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-3 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-4 | No fix listed |
| debian/linux(Debian:12) | = 6.1.38-4~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.52-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.55-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.55-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.64-1 | No fix listed |
Show 40 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/linux(Debian:12) | = 6.1.66-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.67-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.69-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.69-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.76-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.76-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.82-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.85-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.90-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.90-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.94-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.94-1~bpo11+1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.98-1 | No fix listed |
| debian/linux(Debian:12) | = 6.1.99-1 | No fix listed |
| debian/linux(Debian:13) | < 6.12.19-1 | 6.12.19-1 |
| debian/linux(Debian:14) | < 6.12.19-1 | 6.12.19-1 |
| Linux kernel | >= 067fe038e70f6e64960d26a79c4df5f1413d0f13, < 5ae1b18f05ee2b849dc03b6c15d7da0c1c6efa77 | 5ae1b18f05ee2b849dc03b6c15d7da0c1c6efa77 |
| Linux kernel | >= 067fe038e70f6e64960d26a79c4df5f1413d0f13, < 43b254d46c740bf9dbe65709afa021dd726dfa99 | 43b254d46c740bf9dbe65709afa021dd726dfa99 |
| Linux kernel | >= 067fe038e70f6e64960d26a79c4df5f1413d0f13, < 435d2964af815aae456db554c62963b4515f19d0 | 435d2964af815aae456db554c62963b4515f19d0 |
| Linux kernel | >= 067fe038e70f6e64960d26a79c4df5f1413d0f13, < f1ae50cfb818ce1ac7a674406dfadb7653e2552d | f1ae50cfb818ce1ac7a674406dfadb7653e2552d |
| Linux kernel | >= 067fe038e70f6e64960d26a79c4df5f1413d0f13, < 6f86bdeab633a56d5c6dccf1a2c5989b6a5e323e | 6f86bdeab633a56d5c6dccf1a2c5989b6a5e323e |
| Linux kernel | = 4.17 | No fix listed |
| Linux kernel | < 6.1.130 | 6.1.130 |
| Linux kernel | < 6.6.81 | 6.6.81 |
| Linux kernel | < 6.12.18 | 6.12.18 |
| Linux kernel | < 6.13.6 | 6.13.6 |
| Linux kernel | < 6.14 | 6.14 |
| ubuntu/linux(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/linux-kvm(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/linux-raspi(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/linux(Ubuntu:24.04) | < 6.8.0-84.84 | 6.8.0-84.84 |
| ubuntu/linux-raspi(Ubuntu:24.04) | < 6.8.0-1039.43 | 6.8.0-1039.43 |
| Linux kernel | >= 4.17, < 6.1.130 | 6.1.130 |
| Linux kernel | >= 6.2, < 6.6.81 | 6.6.81 |
| Linux kernel | >= 6.7, < 6.12.18 | 6.12.18 |
| Linux kernel | >= 6.13, < 6.13.6 | 6.13.6 |
| Linux kernel | = 6.14-rc1 | No fix listed |
| Linux kernel | = 6.14-rc2 | No fix listed |
| Linux kernel | = 6.14-rc3 | No fix listed |
| Linux kernel | = 6.14-rc4 | No fix listed |
References
- MSRC Security Update Guide vendor-advisory
- Release Notes vendor-advisory
- Debian Security Tracker CVE-2025-21899 vendor-advisory
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- git.kernel.org patch
- lists.debian.org
- Ubuntu CVE tracker vendor-advisory
- USN-7521-1 vendor-advisory
- USN-7521-2 vendor-advisory
- USN-7521-3 vendor-advisory
- USN-7764-1 vendor-advisory
- USN-7765-1 vendor-advisory
- USN-7766-1 vendor-advisory
- USN-7767-1 vendor-advisory
- USN-7779-1 vendor-advisory
- USN-7767-2 vendor-advisory
- USN-7764-2 vendor-advisory
- USN-7790-1 vendor-advisory
- USN-7800-1 vendor-advisory
- USN-7801-1 vendor-advisory
- USN-7802-1 vendor-advisory
- USN-7801-2 vendor-advisory
- USN-7809-1 vendor-advisory
- USN-7801-3 vendor-advisory
- www.cve.org
- ENISA EUVD EUVD-2025-9422 third-party-advisory