CVE-2024-41029: nvmem: core: limit cell sysfs permissions to main attribute ones
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
nvmem: core: limit cell sysfs permissions to main attribute ones
The cell sysfs attribute should not provide more access to the nvmem data than the main attribute itself.
For example if nvme_config::root_only was set, the cell attribute would still provide read access to everybody.
Mask out permissions not available on the main attribute.
The Linux kernel CVE team has assigned CVE-2024-41029 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.8 with commit 0331c611949f and fixed in 6.9.10 with commit aa066afaaac3 Issue introduced in 6.8 with commit 0331c611949f and fixed in 6.10 with commit 6bef98bafd82
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-41029
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/nvmem/core.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/aa066afaaac32caf2160d58d4e3010ee04421c62 https://git.kernel.org/stable/c/6bef98bafd82903a8d461463f9594f19f1fd6a85