In elfutils 0.175, a negative-sized memcpy is attempted in elf_cvt_note in
libelf/note_xlate.h because of an incorrect overflow check. Crafted elf input
causes a segmentation fault, leading to denial of service (program crash).
Created elfutils tracking bugs for this issue:
Affects: fedora-all [bug 1677537]
The vulnerable function was introduced via the following commit:
This was released with elfutils 0.130
(In reply to Huzaifa S. Sidhpurwala from comment #5)
> The vulnerable function was introduced via the following commit:
That commit introduced elf_cvt_note with a bug that would miss len being smaller than a full header, which was part of elfutils-0.130.
That was fixed in commit 315ebd5288553448406d77b007ff658c1b83abb3 "Fix possible crash in note conversion." which was part of elfutils-0.139.
Then commit 5199e15870e05e5b0b9f98c20fc9b5427aa6dd6a "Recognize and parse GNU Property notes." added support for a new note type with different alignment/padding rules.
This commit (re)introduced the bug by using the wrong constant for the note header length (a corrupt note of 9, 10 or 11 bytes would now possibly trigger the bad memcpy for well chosen namesz and/or descsz values).
This was part of elfutils 0.175, but that commit was (also) backported to elfutils 0.174 for some Fedora and RHEL releases.
In reply to comment #9:
> Huzaifa, I hate to quibble, but the "A:H" part in
> cvss3=5.5/CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H seems inflated too.
> There is no service whose availability is hurt by this bug. It is an
> ordinary crash-on-crafted-input bug, with no particular security relevance.
Updated A:L and severity to Low