freebsd-dev/libexec
Jessica Clarke becd9908be rtld-elf: Fix leaks and wild frees in origin_subst
55abf23dd3 inverted the value passed to origin_subst_one when rolling
up the existing code into a loop. If the first token is found ($ORIGIN),
this results in a wild free of part of strtab. Processing the second
token works fine and will act how the first should have regardless of
whether found, allocating memory for the string without freeing.
Processing subsequent tokens however will then leak, regardless of
whether found, as they will also believe they need to allocate memory
and can't free the string.

Found by:	CHERI
Reviewed by:	kib, markj
Fixes:		55abf23dd3 ("rtld: make token substitution table-driven")
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D35792
2022-07-12 17:47:47 +01:00
..
atf testing: provide meaningful error when pytest is not available 2022-07-06 19:55:58 +00:00
atrun
blacklistd-helper
bootpd bootp: remove the USE_BFUNCS knob 2021-09-30 23:47:06 -05:00
comsat
dma dma: make the version exposed reflect the new version 2021-09-22 11:12:04 +02:00
fingerd
flua stand: lua: enhance lfs.dir() to speed up kernels_autodetect 2021-01-29 12:47:29 -06:00
ftpd ftp: Use /var/spool/ftp as ftp's home consistently 2022-06-28 15:20:05 +02:00
getty pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
hyperv pkgbase: Create a FreeBSD-hyperv package 2021-09-07 10:24:54 +02:00
mail.local
makewhatis.local
mknetid
phttpget phttpget: move out of portsnap 2020-09-09 00:39:47 +00:00
pppoed
rbootd
rc rc.subr: Fix a typo 2022-07-08 21:35:34 +02:00
revnetgroup
rpc.rquotad pkgbase: Create a FreeBSD-nfs package 2021-06-19 17:49:50 +02:00
rpc.rstatd
rpc.rusersd
rpc.rwalld
rpc.sprayd
rtld-elf rtld-elf: Fix leaks and wild frees in origin_subst 2022-07-12 17:47:47 +01:00
rtld-elf32
save-entropy
smrsh
talkd
tcpd pkgbase: Create a FreeBSD-tcpd package 2021-12-21 10:17:31 +01:00
telnetd ncurses: chase dependency changes in the source tree 2021-10-04 11:38:24 +02:00
tests
tftp-proxy (t)ftp-proxy: use libpfctl 2021-04-10 11:16:02 +02:00
tftpd When receiving a file having a length, which is a mulitple of the blocksize, 2020-12-15 09:43:18 +00:00
ulog-helper
ypxfr pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
Makefile phttpget: move out of portsnap 2020-09-09 00:39:47 +00:00
Makefile.amd64
Makefile.i386
Makefile.inc Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00