CVE-2026-43088: net: af_key: zero aligned sockaddr tail in PF_KEY exports
In the Linux kernel, the following vulnerability has been resolved:
net: afkey: zero aligned sockaddr tail in PFKEY exports
PFKEY export paths use pfkeysockaddrsize() when reserving sockaddr payload space, so IPv6 addresses occupy 32 bytes on the wire. However, pfkeysockaddrfill() initializes only the first 28 bytes of struct sockaddrin6, leaving the final 4 aligned bytes uninitialized.
Not every PFKEY message is affected. The state and policy dump builders already zero the whole message buffer before filling the sockaddr payloads. Keep the fix to the export paths that still append aligned sockaddr payloads with plain skbput():
- SADBACQUIRE - SADBXNATTNEWMAPPING - SADBXMIGRATE
Fix those paths by clearing only the aligned sockaddr tail after pfkeysockaddrfill().
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
In the PF_KEY export paths SADB_ACQUIRE, SADB_X_MIGRATE, and SADB_X_NAT_T_NEW_MAPPING, after calling pfkey_sockaddr_fill(), explicitly zero the aligned sockaddr tail bytes left uninitialized by pfkey_sockaddr_fill() (for struct sockaddr_in6 the final 4 bytes). Ensure the code clears only the aligned tail bytes rather than the whole sockaddr if that is the intended fix.
Linux kernel net/af_key (PF_KEY exports) zero_aligned_sockaddr_tail = true - Operational
Audit PF_KEY export code paths (including state and policy dump builders) that use pfkey_sockaddr_size() and pfkey_sockaddr_fill(). For any builder that does not already zero the whole message buffer before filling the sockaddr, modify the builder to either zero the message buffer prior to filling or explicitly clear the aligned sockaddr tail bytes so no final bytes remain uninitialized.