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

(cherry picked from commit 0dab21248bc9fab09e92b0c037303c921ebb1b8d)

Details

Provenance
Tobias Heider <me@tobhe.me>Authored on Wed, Dec 4, 1:13 AM
markjCommitted on Wed, Dec 18, 2:15 PM
Parents
rG6b466bbd6134: nanobsd: Fix typos
Branches
Unknown
Tags
Unknown