Linux: memcg: make the v1 soft limit knob inert
What fixes it
- 72fb67f6e0e5d78e4f34cf9929d1afdb0fd54203LinuxCVE List
- 0a90e268cce7023f34087bfa4affb42e29ff5f45LinuxCVE List
- 5ec8f629a300cc40e746d6178f724bdff7683fa7LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
memcg: make the v1 soft limit knob inert
The v1 soft limit has been deprecated since v6.12 and nobody has reported depending on it. Start the removal by decoupling the interface from the implementation: keep memory.soft_limit_in_bytes, but ignore writes to it and always report the maximum value on read similar to what memory.kmem.limit_in_bytes already does.
Writes are still parsed, so malformed input keeps returning -EINVAL. The knob now also behaves the same everywhere: it used to return -EOPNOTSUPP on PREEMPT_RT, where soft limit reclaim has always been disabled.
This also fixes the syzbot report linked below. Soft limit reclaim is the only caller that runs shrink_lruvec() from kswapd against a specific memcg, so it is the only way to reach lru_gen_shrink_lruvec() and in turn set_mm_walk(), which warns when called from kswapd.
Text from CVE List
Affected versions 12
- Linuxaffected: e9d4e1ee788097484606c32122f146d802a9c5fb before bf75f14d755f9cfbb246e6cc011b53cdd5142de3CVE List
- Linuxaffected: e9d4e1ee788097484606c32122f146d802a9c5fb before 72fb67f6e0e5d78e4f34cf9929d1afdb0fd54203CVE List
- Linuxaffected: e9d4e1ee788097484606c32122f146d802a9c5fb before 0a90e268cce7023f34087bfa4affb42e29ff5f45CVE List
- Linuxaffected: e9d4e1ee788097484606c32122f146d802a9c5fb before 5ec8f629a300cc40e746d6178f724bdff7683fa7CVE List
- Linuxaffected: e9d4e1ee788097484606c32122f146d802a9c5fb before a3417097fb107cea3358b19bcbb4eb655fd67f8cCVE List
- Linuxaffected: 6.3CVE List
- Linuxunaffected: all versions before 6.3CVE List
- Linuxunaffected: 6.6.160 through 6.6.*CVE List
- Linuxunaffected: 6.12.110 through 6.12.*CVE List
- Linuxunaffected: 6.18.51 through 6.18.*CVE List
- Linuxunaffected: 7.2.5 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 5
- git.kernel.org/stable/c/bf75f14d755f9cfbb246e6cc011b53cdd5142de3Referencevia CVE List
- git.kernel.org/stable/c/72fb67f6e0e5d78e4f34cf9929d1afdb0fd54203Referencevia CVE List
- git.kernel.org/stable/c/0a90e268cce7023f34087bfa4affb42e29ff5f45Referencevia CVE List
- git.kernel.org/stable/c/5ec8f629a300cc40e746d6178f724bdff7683fa7Referencevia CVE List
- git.kernel.org/stable/c/a3417097fb107cea3358b19bcbb4eb655fd67f8cReferencevia CVE List