summary refs log tree commit diff
path: root/io/Makefile
diff options
context:
space:
mode:
authorXiaoming Ni <nixiaoming@huawei.com>2020-11-26 13:35:10 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-11-26 17:35:58 -0300
commit106ff08526d3ca574ba86d891450ea55aa929712 (patch)
treebdf0f8a9fee37a63ce497ccdce712711023f7a61 /io/Makefile
parentdb07fae8250401adb2b97ab3e53d41da2a6bd767 (diff)
downloadglibc-106ff08526d3ca574ba86d891450ea55aa929712.tar.gz
glibc-106ff08526d3ca574ba86d891450ea55aa929712.tar.xz
glibc-106ff08526d3ca574ba86d891450ea55aa929712.zip
io: nftw/ftw: Fix stack overflow with large nopenfd [BZ #26353]
The nopenfd value is used as argument for the internal buffer on
ftw_statup, which is allocated with alloca and might trigger
a stack overflow for large values.  This patch replaces the memory
allocation to use malloc instead.

Checked on x86_64-linux-gnu.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'io/Makefile')
-rw-r--r--io/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/io/Makefile b/io/Makefile
index 6dd2c33fcf..33f5b0b867 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -68,7 +68,8 @@ tests		:= test-utime test-stat test-stat2 test-lfs tst-getcwd \
 		   tst-posix_fallocate tst-posix_fallocate64 \
 		   tst-fts tst-fts-lfs tst-open-tmpfile \
 		   tst-copy_file_range tst-getcwd-abspath tst-lockf \
-		   tst-ftw-lnk tst-file_change_detection tst-lchmod
+		   tst-ftw-lnk tst-file_change_detection tst-lchmod \
+		   tst-ftw-bz26353
 
 # Likewise for statx, but we do not need static linking here.
 tests-internal += tst-statx