opnsense-src/sys/netipsec
Andrey V. Elsukov 72e2ebf642 pfkey2: use correct value for a key length
The length of key data is specified via sadb_key_bits field.
Use specified size for buffer allocation and key copying.
Also add a check that the value of sadb_key_bits is not zero,
as explicitly required in RFC 2367.

PR:		241010
Submitted by:	jean-francois.hren at stormshield eu

(cherry picked from commit 04207850a9b988d3c04e904cb5783f33da7fe184)
2025-03-13 13:21:30 +03:00
..
ah.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ah_var.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
esp.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
esp_var.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ipcomp.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ipcomp_var.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ipsec.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ipsec.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ipsec6.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ipsec_input.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ipsec_mbuf.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ipsec_mod.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ipsec_output.c ipsec: fix IPv6 over IPv4 tunneling. 2024-12-02 13:24:03 +03:00
ipsec_pcb.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ipsec_support.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
key.c pfkey2: use correct value for a key length 2025-03-13 13:21:30 +03:00
key.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
key_debug.c pfkey: Fix some checks in kdebug_sadb() 2024-12-18 13:43:42 +00:00
key_debug.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
key_var.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
keydb.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
keysock.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
keysock.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
subr_ipsec.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
udpencap.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
xform.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
xform_ah.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
xform_esp.c ipsec esp: avoid dereferencing freed secasindex 2024-03-04 02:27:17 +02:00
xform_ipcomp.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
xform_tcp.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00