HomeFreeBSD

pfkey: Fix some checks in kdebug_sadb()

Description

pfkey: Fix some checks in kdebug_sadb()

Besides not doing any sufficient check that the length of a parsed
message is not bigger than the actual allocated buffer, kdebug_sadb()
incorrectly compares ext->sadb_ext_len, the extension payload size in 8
byte chunks, with tlen, which is the full message payload size in bytes.

This should compare PFKEY_UNUNIT64(ext->sadb_ext_len) with tlen instead.

PR: 277456
MFC after: 2 weeks

Details

Provenance
Tobias Heider <me@tobhe.me>Authored on Dec 4 2024, 1:13 AM
markjCommitted on Dec 4 2024, 4:22 PM
Parents
rG3d642b0f71c5: iflib: Set the NUMA domain in receive packet headers
Branches
Unknown
Tags
Unknown