mirror_zfs/cmd/zpool
Richard Yao ba87ed1410 Fix potential buffer overflow in zpool command
The ZPOOL_SCRIPTS_PATH environment variable can be passed here. This
allows for arbitrarily long strings to be passed to sprintf(), which can
overflow the buffer.

I missed this in my earlier audit of the codebase. CodeQL's
cpp/unbounded-write check caught this.

Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14264
2022-12-08 14:14:30 -08:00
..
compatibility.d
os
zpool.d
Makefile.am
zpool_iter.c
zpool_main.c Fix potential buffer overflow in zpool command 2022-12-08 14:14:30 -08:00
zpool_util.c
zpool_util.h
zpool_vdev.c