summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2026-06-05 10:12:38 -0700
committerDave Jiang <dave.jiang@intel.com>2026-06-10 11:19:10 -0700
commit81eafcada109b653977c4dfbd2b6a72470025a01 (patch)
treecd788c85efdc333f73dc7dd6bf3885f2597e06b6 /drivers/phy/eswin/git@git.tavy.me:linux.git
parent71a1def165267bc0947d4236f7336f490739c379 (diff)
cxl/test: Fix integer overflow in mock LSA bounds checks
Pre-existing issue discovered by sashiko-bot. mock_get_lsa() and mock_set_lsa() validate the requested LSA range with "offset + length > LSA_SIZE". Both offset and length are u32 and, in mock_get_lsa(), both are taken directly from the user-supplied payload. The addition is evaluated modulo 2^32, so a large offset combined with a small length wraps around and passes the check. Rewrite the checks to first bound offset, then compare length against the remaining LSA size. Suggested-by: sashiko-bot Fixes: 7d3eb23c4ccf ("tools/testing/cxl: Introduce a mock memory device + driver") Link: https://lore.kernel.org/linux-cxl/20260605143748.235271F00893@smtp.kernel.org/ Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Alison Schofield <alison.schofield@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions