evm: terminate and bound the evm_xattrs read buffer
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel a36cbfb85f26e6c6fb6529b1a364331b94dc88f3, Kernel 0b9f8282b40af4a99d6243d2cb939d14ff36b049, Kernel 11143a19f5b8dc8f414deab87571134f9f447313 and 10 more.
In the Linux kernel, the following vulnerability has been resolved: evm: terminate and bound the evm_xattrs read buffer evm_read_xattrs() allocates size + 1 bytes, fills them from the list of enabled xattrs, and then passes strlen(temp) to simple_read_from_buffer(). When no configured xattrs are enabled, the fill loop stores nothing and temp[0] remains uninitialized, so strlen() reads beyond initialized memory. Explicitly terminate the buffer after allocation, use snprintf() for each formatted line, and pass the accumulated length, without risk of truncation, to simple_read_from_buffer().
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=fa516b66a1bfce1d72f1620c54bdfebc493000d1 <a36cbfb85f26e6c6fb6529b1a364331b94dc88f3, >=fa516b66a1bfce1d72f1620c54bdfebc493000d1 <0b9f8282b40af4a99d6243d2cb939d14ff36b049, >=fa516b66a1bfce1d72f1620c54bdfebc493000d1 <11143a19f5b8dc8f414deab87571134f9f447313, >=fa516b66a1bfce1d72f1620c54bdfebc493000d1 <12ad52dc45a0c8c9d25e85b4a84201de4c5420ed, >=fa516b66a1bfce1d72f1620c54bdfebc493000d1 <38b7d63b23aa9d2ddde7688040e9426d32be4065, >=fa516b66a1bfce1d72f1620c54bdfebc493000d1 <8df81954d22a653a8b01d46692cd56f71137269b, >=fa516b66a1bfce1d72f1620c54bdfebc493000d1 <a0f64cf8bfcb39e533d9e27aeb763a8d81b7f39d, =4.18 | a36cbfb85f26e6c6fb6529b1a364331b94dc88f3, 0b9f8282b40af4a99d6243d2cb939d14ff36b049, 11143a19f5b8dc8f414deab87571134f9f447313, 12ad52dc45a0c8c9d25e85b4a84201de4c5420ed, 38b7d63b23aa9d2ddde7688040e9426d32be4065, 8df81954d22a653a8b01d46692cd56f71137269b, a0f64cf8bfcb39e533d9e27aeb763a8d81b7f39d |
| linux-kernel: Kernel | >=5.16.0 <6.1.178, >=6.13.0 <6.18.40, >=6.19.0 <7.1.5, >=6.2.0 <6.6.145, >=6.7.0 <6.12.97, >=4.18.0 <5.15.212 | 6.1.178, 6.18.40, 7.1.5, 6.6.145, 6.12.97, 5.15.212 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket