]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch 'fix-stale-register-bounds-on-lsm-retval-context-load'
authorAlexei Starovoitov <ast@kernel.org>
Tue, 23 Jun 2026 00:11:47 +0000 (17:11 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 23 Jun 2026 00:11:47 +0000 (17:11 -0700)
Tristan Madani says:

====================
Fix stale register bounds on LSM retval context load

From: Tristan Madani <tristan@talencesecurity.com>

check_mem_access() calls __mark_reg_s32_range() to narrow a register to
the LSM hook retval range, but the intersection preserves stale bounds
from prior instructions. Add mark_reg_unknown() before narrowing (same
pattern as the else branch) and a selftest that catches the mismatch.

Changes in v3:
- Add selftest demonstrating the issue (Eduard Zingerman)
- No code change in patch 1 from v2
====================

Link: https://patch.msgid.link/20260622230123.3695446-1-tristmd@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Trivial merge