opnsense-src/sys/netinet/libalias
Dag-Erling Smørgrav 649b7862fc libalias: Fix buffer overflow in RTSP aliasing
In alias_rtsp_out(), we construct a new packet in a fixed-length buffer
before copying it back into the original buffer.  We never checked if
the data we were writing to this temporary buffer fit in it, nor if the
result fit in the original buffer.

* Use a dynamically sized allocated buffer instead of a fixed-length
  stack buffer.

* Check for overflow before appending to our temporary buffer.

* Check for overflow before copying the data back to the packet buffer.

* While here, use size_t for sizes and bool for booleans.

Approved by:	so
Security:	FreeBSD-SA-26:41.libalias
Security:	CVE-2026-49420
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D57753
2026-06-30 23:16:40 +02:00
..
alias.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
alias.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
alias_db.c libalias: fix subtle racy problem in outside-inside forwarding 2024-08-25 13:31:24 +07:00
alias_db.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
alias_dummy.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
alias_ftp.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
alias_irc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
alias_local.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
alias_mod.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
alias_mod.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
alias_nbt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
alias_pptp.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
alias_proxy.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
alias_sctp.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
alias_sctp.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
alias_skinny.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
alias_smedia.c libalias: Fix buffer overflow in RTSP aliasing 2026-06-30 23:16:40 +02:00
alias_util.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
HISTORY sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
libalias.3 sys: Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:06 -06:00