FreeBSD Bugzilla – Attachment 248911 Details for
Bug 277456
netipsec: kdebug_sadb invalid length check for sadb_ext_len
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated Fix
kdebug_sadb2.diff (text/plain), 897 bytes, created by
Tobias Heider
on 2024-03-03 23:26:55 UTC
(
hide
)
Description:
Updated Fix
Filename:
MIME Type:
Creator:
Tobias Heider
Created:
2024-03-03 23:26:55 UTC
Size:
897 bytes
patch
obsolete
>diff --git a/sys/netipsec/key_debug.c b/sys/netipsec/key_debug.c >index dcb542b22ad8..fb317c4149c4 100644 >--- a/sys/netipsec/key_debug.c >+++ b/sys/netipsec/key_debug.c >@@ -189,13 +189,14 @@ kdebug_sadb(struct sadb_msg *base) > ext->sadb_ext_len, ext->sadb_ext_type, > kdebug_sadb_exttype(ext->sadb_ext_type)); > >- if (ext->sadb_ext_len == 0) { >+ extlen = PFKEY_UNUNIT64(ext->sadb_ext_len); >+ if (extlen == 0) { > printf("%s: invalid ext_len=0 was passed.\n", __func__); > return; > } >- if (ext->sadb_ext_len > tlen) { >+ if (extlen > tlen) { > printf("%s: ext_len too big (%u > %u).\n", >- __func__, ext->sadb_ext_len, tlen); >+ __func__, extlen, tlen); > return; > } > >@@ -257,7 +258,6 @@ kdebug_sadb(struct sadb_msg *base) > return; > } > >- extlen = PFKEY_UNUNIT64(ext->sadb_ext_len); > tlen -= extlen; > ext = (struct sadb_ext *)((caddr_t)ext + extlen); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 277456
:
248900
| 248911