tracing: Prevent out-of-bounds read in glob matching
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.96, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
In the Linux kernel, the following vulnerability has been resolved: tracing: Prevent out-of-bounds read in glob matching String event fields are not necessarily NUL-terminated, so the filter predicate functions (filter_pred_string(), filter_pred_strloc() and filter_pred_strrelloc()) pass the field length to the regex match callbacks, and the length-aware matchers honour it. regex_match_glob() was the exception: it ignored the length and called glob_match(), which scans the string until it hits a NUL byte. Some string fields are not NUL-terminated. One example is the dynamic char array of the xfs_* namespace tracepoints, which is copied without a trailing NUL. For such a field, glob matching reads past the end of the event field, causing a KASAN slab-out-of-bounds read in glob_match(), reached via regex_match_glob() and filter_match_preds() from the xfs_lookup tracepoint. Add a length-bounded glob_match_len() and use it from regex_match_glob() so glob matching always stops at the field boundary. The matching loop is factored into a shared helper so glob_match() keeps its behaviour.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- Linux Linux
From 60f1d5e3bac44b598f67d36062da96c095d2b700 · fixed in 265f3a690f6c7d69ef7d2ca50b04b4853a211df3; From 60f1d5e3bac44b598f67d36062da96c095d2b700 · fixed in ee5b8888d3248618251fb69a2fad92afcb81557e; From 60f1d5e3bac44b598f67d36062da96c095d2b700 · fixed in 56d4c9ab84714eebb285a2fee68aaedf81e3ef15; From 60f1d5e3bac44b598f67d36062da96c095d2b700 · fixed in 35ae19764eabfe9c29029d3b5713c86e6855acdf; From 60f1d5e3bac44b598f67d36062da96c095d2b700 · fixed in ebb55902856973906c8bb339a3a34824ed4a5086; From 60f1d5e3bac44b598f67d36062da96c095d2b700 · fixed in 2dad64a97e1df47f5d9ccb17fa319aa348617226; From 60f1d5e3bac44b598f67d36062da96c095d2b700 · fixed in e5d5f3bd053a5f14787526c9f0f55ef900d43ac6; From 60f1d5e3bac44b598f67d36062da96c095d2b700 · fixed in 0a6070839b1ef276d5b05bedfb787743e140fb17
- Linux Linux
4.10
- KernelLinux
From 4.10.0 · fixed in 5.10.261; From 5.11.0 · fixed in 5.15.212; From 5.16.0 · fixed in 6.1.178; From 6.2.0 · fixed in 6.6.145; From 6.7.0 · fixed in 6.12.96; From 6.13.0 · fixed in 6.18.39; From 6.19.0 · fixed in 7.1.4
References 8
git.kernel.org
- stable/c/265f3a690f6c7d69ef7d2ca50b04b4853a211df3
- stable/c/ee5b8888d3248618251fb69a2fad92afcb81557e
- stable/c/56d4c9ab84714eebb285a2fee68aaedf81e3ef15
- stable/c/35ae19764eabfe9c29029d3b5713c86e6855acdf
- stable/c/ebb55902856973906c8bb339a3a34824ed4a5086
- stable/c/2dad64a97e1df47f5d9ccb17fa319aa348617226
- stable/c/e5d5f3bd053a5f14787526c9f0f55ef900d43ac6
- stable/c/0a6070839b1ef276d5b05bedfb787743e140fb17