[Bug 219154] [PATCH] buffer overflows in realpath(3)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu May 11 20:54:46 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219154

--- Comment #3 from Jan Kokemüller <jan.kokemueller at gmail.com> ---
I've added some tests to a local copy of
'contrib/netbsd-tests/lib/libc/gen/t_realpath.c' [1].
Would a new file in 'lib/libc/tests/gen' be a better place?

realpath_buffer_overflow:
This tests for the buffer overflow of the "left" array. But this test only
fails with ASAN enabled ("-fsanitize=address").

realpath_empty_symlink:
This tests for empty symlink behavior. Currently, "/tmp/empty_symlink/aaa"
resolves to "/tmp/aaa", but the right behavior is to fail and return ENOENT.
When ASAN is enabled this test crashes.


[1]:
https://github.com/jiixyj/realpath-fuzzer/commit/eb1c51adbdc2fe56b216f22b8f46cffd6a032c67

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-security mailing list