diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2022-07-22 11:16:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-07-25 11:49:25 +0100 |
commit | c630d1fe6219769049c87d1a6a0e9a6de55328a1 (patch) | |
tree | 3131d6cf576f7fd5ebd50705e83d8856e6931332 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | b07a0e2044057f201d694ab474f5c42a02b6465b (diff) |
macsec: always read MACSEC_SA_ATTR_PN as a u64
Currently, MACSEC_SA_ATTR_PN is handled inconsistently, sometimes as a
u32, sometimes forced into a u64 without checking the actual length of
the attribute. Instead, we can use nla_get_u64 everywhere, which will
read up to 64 bits into a u64, capped by the actual length of the
attribute coming from userspace.
This fixes several issues:
- the check in validate_add_rxsa doesn't work with 32-bit attributes
- the checks in validate_add_txsa and validate_upd_sa incorrectly
reject X << 32 (with X != 0)
Fixes: 48ef50fa866a ("macsec: Netlink support of XPN cipher suites (IEEE 802.1AEbw)")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions