]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix path length overflow in realpath [BZ #22786]
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Wed, 9 May 2018 01:12:41 +0000 (18:12 -0700)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 17 May 2018 12:10:16 +0000 (14:10 +0200)
commitaf7519f7b35024224c163e32a89fb247b0c446fc
tree474277da7fd5c6e51f73421ae7d8fd6c4733f8e1
parent365722ace6c9bad3167804fa8f12884eafae6d8f
Fix path length overflow in realpath [BZ #22786]

Integer addition overflow may cause stack buffer overflow
when realpath() input length is close to SSIZE_MAX.

2018-05-09  Paul Pluzhnikov  <ppluzhnikov@google.com>

[BZ #22786]
* stdlib/canonicalize.c (__realpath): Fix overflow in path length
computation.
* stdlib/Makefile (test-bz22786): New test.
* stdlib/test-bz22786.c: New test.

(cherry picked from commit 5460617d1567657621107d895ee2dd83bc1f88f2)
ChangeLog
NEWS
stdlib/Makefile
stdlib/canonicalize.c
stdlib/test-bz22786.c [new file with mode: 0644]