Skip to content

[elfutils] turn on the alignment check#7092

Merged
DavidKorczynski merged 2 commits intogoogle:masterfrom
evverx:elfutils-alignment
Jan 5, 2022
Merged

[elfutils] turn on the alignment check#7092
DavidKorczynski merged 2 commits intogoogle:masterfrom
evverx:elfutils-alignment

Conversation

@evverx
Copy link
Copy Markdown
Contributor

@evverx evverx commented Jan 4, 2022

Unaligned access can crash code on some architectures like SPARC for example. The latest example (unrelated to elfutils) would be systemd/systemd#21935 (which UBSan could have easily prevented and which led to rolling out the check in the systemd project among other things).

It should probably be merged once https://sourceware.org/bugzilla/show_bug.cgi?id=28720 is closed.
On second thought almost all of those issues have been fixed and at this point it seems it would make sense to merge it and wait for OSS-Fuzz to sort out duplicates automatically and report what's left.

evverx added 2 commits January 4, 2022 21:18
Unaligned access can crash code on some architectures
like SPARC for example. The latest example (unrelated to elfutils)
would be systemd/systemd#21935 (which UBSan
could have easily prevented and which led to rolling out the check
in the systemd project among other things).

It should probably be merged once https://sourceware.org/bugzilla/show_bug.cgi?id=28720
is closed.
to make it easier to run the fuzzer with gdb locally.
@evverx evverx marked this pull request as ready for review January 4, 2022 22:03
keszybz pushed a commit to systemd/systemd that referenced this pull request Jan 5, 2022
It was copy-pasted directly from OSS-Fuzz where it makes sense to
kind of strip binaries to get nice backtraces but when the fuzzers
are built and run locally with gdb it would be nice to have a little
bit more than that.

It was initially discovered in elfutils where I put the same flags
and was surprised when I couldn't run the fuzzer comfortably step
by step, which led to the same change there: google/oss-fuzz#7092
:-)
@DavidKorczynski DavidKorczynski merged commit 8747524 into google:master Jan 5, 2022
evverx added a commit to evverx/elfutils that referenced this pull request Jan 5, 2022
@evverx evverx deleted the elfutils-alignment branch January 5, 2022 20:12
evverx added a commit to evverx/elfutils that referenced this pull request Jan 5, 2022
@evverx
Copy link
Copy Markdown
Contributor Author

evverx commented Jan 5, 2022

Looks like that last issue was found and reported in https://oss-fuzz.com/testcase-detail/6013023414779904 but it hasn't been reported on Monorail. @jonathanmetzman I wonder if I should wait a bit longer for it to be reported there or considering that check is turned off by default should maybe a new crash signature be added somewhere?

@evverx
Copy link
Copy Markdown
Contributor Author

evverx commented Jan 6, 2022

Judging by https://sourceware.org/pipermail/elfutils-devel/2022q1/004629.html it was reported on Monorail.

evverx added a commit to evverx/elfutils that referenced this pull request Jan 8, 2022
evverx added a commit to evverx/elfutils that referenced this pull request Jan 8, 2022
evverx added a commit to evverx/elfutils that referenced this pull request Mar 21, 2022
evverx added a commit to evverx/elfutils that referenced this pull request Mar 21, 2022
MartinPetkov pushed a commit to MartinPetkov/oss-fuzz that referenced this pull request Aug 15, 2022
* [elfutils] turn on the alignment check

Unaligned access can crash code on some architectures
like SPARC for example. The latest example (unrelated to elfutils)
would be systemd/systemd#21935 (which UBSan
could have easily prevented and which led to rolling out the check
in the systemd project among other things).

It should probably be merged once https://sourceware.org/bugzilla/show_bug.cgi?id=28720
is closed.

* [elfutils] drop line-tables-only

to make it easier to run the fuzzer with gdb locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants