opnsense-src/lib/libiconv_modules
Mark Johnston 7ebb2e8b33 iconv: Fix a stack buffer overflow in _ISO2022_sputwchar()
In the ISO2022-CN encoding, characters may require at least seven bytes,
and MB_LEN_MAX==6 is insufficient.  From code inspection,
_ISO2022_sputwchar() can emit 10 bytes in the worst case, so use that to
size buffers.

Add a regression test.

Approved by:	so
Security:	FreeBSD-SA-26:49.iconv
Security:	CVE-2026-58082
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D57950
2026-07-06 10:29:47 +02:00
..
BIG5 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
DECHanyu Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
EUC Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
EUCTW Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
GBK2K Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
HZ iconv: Fix a buffer overflow in the HZ encoding 2026-07-06 10:29:46 +02:00
iconv_none Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
iconv_std Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ISO2022 iconv: Fix a stack buffer overflow in _ISO2022_sputwchar() 2026-07-06 10:29:47 +02:00
JOHAB Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mapper_646 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mapper_none Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mapper_parallel Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mapper_serial Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mapper_std libiconv: Fix typo in comment 2026-01-26 10:52:54 -05:00
mapper_zone Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
MSKanji Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
UES Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
UTF7 iconv(3): Fix problems in various encodings 2026-07-06 10:29:43 +02:00
UTF8 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
UTF1632 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
VIQR iconv(3): Fix problems in various encodings 2026-07-06 10:29:43 +02:00
ZW iconv(3): Fix problems in various encodings 2026-07-06 10:29:43 +02:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00