Linux
tracing: Prevent out-of-bounds read in glob matching
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 60f1d5e3bac44b598f67d36062da96c095d2b700, < 265f3a690f6c7d69ef7d2ca50b04b4853a211df3
- >= 60f1d5e3bac44b598f67d36062da96c095d2b700, < ee5b8888d3248618251fb69a2fad92afcb81557e
- >= 60f1d5e3bac44b598f67d36062da96c095d2b700, < 56d4c9ab84714eebb285a2fee68aaedf81e3ef15
- >= 60f1d5e3bac44b598f67d36062da96c095d2b700, < 35ae19764eabfe9c29029d3b5713c86e6855acdf
- >= 60f1d5e3bac44b598f67d36062da96c095d2b700, < ebb55902856973906c8bb339a3a34824ed4a5086
- >= 60f1d5e3bac44b598f67d36062da96c095d2b700, < 2dad64a97e1df47f5d9ccb17fa319aa348617226
- >= 60f1d5e3bac44b598f67d36062da96c095d2b700, < e5d5f3bd053a5f14787526c9f0f55ef900d43ac6
- >= 60f1d5e3bac44b598f67d36062da96c095d2b700, < 0a6070839b1ef276d5b05bedfb787743e140fb17
Fixed in 265f3a690f6c7d69ef7d2ca50b04b4853a211df3, ee5b8888d3248618251fb69a2fad92afcb81557e, 56d4c9ab84714eebb285a2fee68aaedf81e3ef15, 35ae19764eabfe9c29029d3b5713c86e6855acdf, ebb55902856973906c8bb339a3a34824ed4a5086, 2dad64a97e1df47f5d9ccb17fa319aa348617226, e5d5f3bd053a5f14787526c9f0f55ef900d43ac6, 0a6070839b1ef276d5b05bedfb787743e140fb17
- 4.10
Fixed in 0, 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.96, 6.18.39, 7.1.4, 7.2
Mitigation
Upgrade Linux to 265f3a690f6c7d69ef7d2ca50b04b4853a211df3 or ee5b8888d3248618251fb69a2fad92afcb81557e or 56d4c9ab84714eebb285a2fee68aaedf81e3ef15 or 35ae19764eabfe9c29029d3b5713c86e6855acdf or ebb55902856973906c8bb339a3a34824ed4a5086 or 2dad64a97e1df47f5d9ccb17fa319aa348617226 or e5d5f3bd053a5f14787526c9f0f55ef900d43ac6 or 0a6070839b1ef276d5b05bedfb787743e140fb17 or later.
Upgrade Linux to 0 or 5.10.261 or 5.15.212 or 6.1.178 or 6.6.145 or 6.12.96 or 6.18.39 or 7.1.4 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.