nft_byteorder: fix the uninitialised-stack read without removing multi-register support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Revert "netfilter: nft_byteorder: remove multi-register support"net/ | +31 | 3 replies | |
| 2/2 | netfilter: nft_byteorder: initialise the marked destination spannet/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 6.18.y 0/2] nft_byteorder: fix the uninitialised-stack read without removing multi-register support
Pablo pointed out that the full upstream removal (bb061d3) cannot be applied to stable trees: nftables versions before 1.1.0 can generate len != size byteorder expressions, and the removal rejects them, so existing rulesets may fail to load. The removal is tagged stable+noautosel for that reason.
This series restores the multi-register path in 6.18.y and fixes the uninitialised-stack read with a targeted initialisation:
1/2 reverts the removal currently in 6.18.y.
2/2 zeroes the destination span marked initialised by the control
plane, but only when source and destination registers differ, so in-place conversions (sreg == dreg) keep their value.
This does not reject any rule and keeps the old userspace-visible behaviour. It removes the dependency on CONFIG_INIT_STACK_ALL_ZERO zeroing the register file.
Compile-tested by reverting the removal and applying 2/2 to the pre-removal tree; runtime testing on 6.18.y is welcome.
Abdifatah Suruur (2):
Revert "netfilter: nft_byteorder: remove multi-register support"
netfilter: nft_byteorder: initialise the marked destination span
Pablo, this is the stable-specific alternative we discussed. If a single folded patch is preferred, I can resend it that way.