Linux
macsec: fix replay protection at XPN lower-PN wrap
In the Linux kernel, the following vulnerability has been resolved: 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).
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= a21ecf0e033807b976967286e6c392f48ee2049f, < dd7306779c6ce1238f4cdc34f3c1f2246b854457
- >= a21ecf0e033807b976967286e6c392f48ee2049f, < d15130461df388136b62a7b0ce9f66e7e2fa9ff1
- >= a21ecf0e033807b976967286e6c392f48ee2049f, < 23c0e230eab397d7f68be2538790ac41d3bb91fd
- >= a21ecf0e033807b976967286e6c392f48ee2049f, < 679e13a65e68a67c8b3c0467c02ee89157ec6f0f
- >= a21ecf0e033807b976967286e6c392f48ee2049f, < 79495a1b0944fe31ffd54b54b00211b493590d62
- >= a21ecf0e033807b976967286e6c392f48ee2049f, < 6d00f5c7e5ff7ec4795b7f5f8ed88bd346641652
- >= a21ecf0e033807b976967286e6c392f48ee2049f, < d55acbe577db892b60547b6ef1c020b359331a6d
- >= a21ecf0e033807b976967286e6c392f48ee2049f, < e68842b3356471ba56c882209f324613dac47f64
Fixed in dd7306779c6ce1238f4cdc34f3c1f2246b854457, d15130461df388136b62a7b0ce9f66e7e2fa9ff1, 23c0e230eab397d7f68be2538790ac41d3bb91fd, 679e13a65e68a67c8b3c0467c02ee89157ec6f0f, 79495a1b0944fe31ffd54b54b00211b493590d62, 6d00f5c7e5ff7ec4795b7f5f8ed88bd346641652, d55acbe577db892b60547b6ef1c020b359331a6d, e68842b3356471ba56c882209f324613dac47f64
- 5.7
Fixed in 0, 5.10.259, 5.15.210, 6.1.176, 6.6.143, 6.12.93, 6.18.35, 7.0.12, 7.1
Mitigation
Upgrade Linux to dd7306779c6ce1238f4cdc34f3c1f2246b854457 or d15130461df388136b62a7b0ce9f66e7e2fa9ff1 or 23c0e230eab397d7f68be2538790ac41d3bb91fd or 679e13a65e68a67c8b3c0467c02ee89157ec6f0f or 79495a1b0944fe31ffd54b54b00211b493590d62 or 6d00f5c7e5ff7ec4795b7f5f8ed88bd346641652 or d55acbe577db892b60547b6ef1c020b359331a6d or e68842b3356471ba56c882209f324613dac47f64 or later.
Upgrade Linux to 0 or 5.10.259 or 5.15.210 or 6.1.176 or 6.6.143 or 6.12.93 or 6.18.35 or 7.0.12 or 7.1 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.