aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/hsi/ssh:/git@git.zx2c4.com/git:
diff options
context:
space:
mode:
authorJunrui Luo <moonafterrain@outlook.com>2026-05-20 11:47:55 +0800
committerJakub Kicinski <kuba@kernel.org>2026-05-25 12:40:47 -0700
commite68842b3356471ba56c882209f324613dac47f64 (patch)
treef057d771adaad63ec5ce1ece2c264add81ab683b /include/linux/hsi/ssh:/git@git.zx2c4.com/git:
parentipv6: exthdrs: refresh nh pointer after ipv6_hop_jumbo() (diff)
macsec: fix replay protection at XPN lower-PN wrap
In macsec_post_decrypt(), when pn is U32_MAX, pn + 1 overflows u32 to 0 and the first branch never fires. If next_pn_halves.lower is also in the upper half, pn_same_half(pn, lower) is true and the XPN else-if does not fire either, leaving next_pn_halves unchanged. An attacker that captures the legitimate frame carrying pn == 0xFFFFFFFF on an XPN association can then replay it indefinitely, since lowest_pn never rises above the captured pn and macsec_decrypt() reconstructs the same IV. Extend the XPN else-if to also fire when pn + 1 wraps to 0, so receipt of pn == U32_MAX advances next_pn_halves to (upper + 1, 0). Fixes: a21ecf0e0338 ("macsec: Support XPN frame handling - IEEE 802.1AEbw") Reported-by: Yuhao Jiang <danisjiang@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Junrui Luo <moonafterrain@outlook.com> Link: https://patch.msgid.link/SYBPR01MB78813FD49E58F253B989F197AF012@SYBPR01MB7881.ausprd01.prod.outlook.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/hsi/ssh:/git@git.zx2c4.com/git:')
0 files changed, 0 insertions, 0 deletions