Add a New Comment (Rich Markup)
Fixed by this commit: Avoid invalid memory access in context format diffs
Attached file will trigger an out of bounds memory read in the function another_hunk, detectable with asan. ASAN stack trace:
==30482==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c00000003f at pc 0x0000005117c3 bp 0x7ffeca1c33d0 sp 0x7ffeca1c33c8 READ of size 1 at 0x60c00000003f thread T0 #0 0x5117c2 in another_hunk /f/patch/patch/src/pch.c:1332:27 #1 0x4f7320 in main /f/patch/patch/src/patch.c:397:25 #2 0x7f1016838ae6 in __libc_start_main (/lib64/libc.so.6+0x21ae6) #3 0x41c889 in _start (/r/patch/patch+0x41c889) 0x60c00000003f is located 1 bytes to the left of 125-byte region [0x60c000000040,0x60c0000000bd) allocated by thread T0 here: #0 0x4bf323 in malloc (/r/patch/patch+0x4bf323) #1 0x56196f in xmalloc /f/patch/patch/lib/xmalloc.c:41:13 #2 0x5064d4 in intuit_diff_type /f/patch/patch/src/pch.c:796:12 #3 0x5064d4 in there_is_another_patch /f/patch/patch/src/pch.c:240 #4 0x4f2ad7 in main /f/patch/patch/src/patch.c:197:2 #5 0x7f1016838ae6 in __libc_start_main (/lib64/libc.so.6+0x21ae6)
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 4 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11