[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-05-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 Martin Liška changed: What|Removed |Added Resolution|--- |MOVED Status|ASSIGNED

[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-04-30 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #8

[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-04-29 Thread rachel at rachelmant dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 --- Comment #7 from Rachel Mant --- Continuing to think on this a bit, and.. if it is undefined behaviour as you say, then granted this is not a bug on ASAN/TSAN.. but it is still a bug as UBSAN does and says nothing when faced with this even tho

[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-04-29 Thread rachel at rachelmant dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 --- Comment #6 from Rachel Mant --- Ok, fair enough - though I'd like to know your thoughts then on the rest of the f*open() family and the fact the sanitizers do check for nullptr paths/filenames even though the wording is the same. The fopen64(

[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-04-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 --- Comment #5 from Jakub Jelinek --- So it might be well defined on Windows, but unless glibc documents it as an extension, it is not valid on Linux. C clearly says: "The fopen function opens the file whose name is the string pointed to by filen

[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-04-29 Thread rachel at rachelmant dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 --- Comment #4 from Rachel Mant --- Glibc, MSVCRT and other CRTs all check for this condition in userspace and NOP it by short-circuiting the call with a return of nullptr. MSVCRT even documents this (https://docs.microsoft.com/en-us/cpp/c-runtim

[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-04-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 --- Comment #3 from Martin Liška --- (In reply to Jakub Jelinek from comment #2) > I think it is undefined behavior and just doesn't crash because the pathname > is passed to a syscall which will fail then. > So IMHO nothing we should support. A

[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-04-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 --- Comment #2 from Jakub Jelinek --- I think it is undefined behavior and just doesn't crash because the pathname is passed to a syscall which will fail then. So IMHO nothing we should support.

[Bug sanitizer/94849] Improper parameter validation in libsanitizer for fopen64

2020-04-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94849 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at