[Bug stdio/14286] Integer overflow in computing allocation size in vfwprintf %s handling

bugdal at aerifal dot cx sourceware-bugzilla@sourceware.org
Sun Jun 24 03:49:00 GMT 2012


http://sourceware.org/bugzilla/show_bug.cgi?id=14286

--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> 2012-06-24 03:48:25 UTC ---
Created attachment 6476
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6476
test case

Ideally, this program should print -1 after the first wprintf fails with
EILSEQ, possibly after printing "hello world". Or if it fails due to memory
exhaustion, it should print -1 with errno set to ENOMEM.

Instead (on 32-bit machines) it simply prints "h\n" followed by a 2 (the return
value of the first wprintf).

Apologies that the test program is not the best-tuned to demonstrate the bug. I
designed it from a standpoint of wanting to see if the bug caused exploitable
memory corruption, rather than best demonstrating the non-exploitable problem.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Glibc-bugs mailing list