diff options
author | Alexei Starovoitov <ast@kernel.org> | 2024-10-15 11:16:25 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-10-15 11:16:25 -0700 |
commit | ee230090f62fbb1c63c7f305d57289ab753221ef (patch) | |
tree | e182ec5e34751574f8d6d7a69ddb8f77a40bc0c4 /net | |
parent | b836cbdf3b81a4a22b3452186efa2e5105a77e10 (diff) | |
parent | 35ccd576a23ce495b4064f4a3445626de790cd23 (diff) | |
download | lwn-ee230090f62fbb1c63c7f305d57289ab753221ef.tar.gz lwn-ee230090f62fbb1c63c7f305d57289ab753221ef.zip |
Merge branch 'fix-truncation-bug-in-coerce_reg_to_size_sx-and-extend-selftests'
Dimitar Kanaliev says:
====================
Fix truncation bug in coerce_reg_to_size_sx and extend selftests.
This patch series addresses a truncation bug in the eBPF verifier function
coerce_reg_to_size_sx(). The issue was caused by the incorrect ordering
of assignments between 32-bit and 64-bit min/max values, leading to
improper truncation when updating the register state. This issue has been
reported previously by Zac Ecob[1] , but was not followed up on.
The first patch fixes the assignment order in coerce_reg_to_size_sx()
to ensure correct truncation. The subsequent patches add selftests for
coerce_{reg,subreg}_to_size_sx.
Changelog:
v1 -> v2:
- Moved selftests inside the conditional check for cpuv4
[1] (https://lore.kernel.org/bpf/h3qKLDEO6m9nhif0eAQX4fVrqdO0D_OPb0y5HfMK9jBePEKK33wQ3K-bqSVnr0hiZdFZtSJOsbNkcEQGpv_yJk61PAAiO8fUkgMRSO-lB50=@protonmail.com/)
====================
Link: https://lore.kernel.org/r/20241014121155.92887-1-dimitar.kanaliev@siteground.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions