Bug 1607459 - Suspected false positive stack-use-after-scope reported by asan when running WebKit
Summary: Suspected false positive stack-use-after-scope reported by asan when running ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 28
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-23 15:10 UTC by Michael Catanzaro
Modified: 2019-05-28 21:56 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-05-28 21:56:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Catanzaro 2018-07-23 15:10:07 UTC
Description of problem: We have found that when WebKitGTK+ is built with gcc-8.1.1-1.fc28 and address sanitizer enabled, it reports a stack-use-after-scope vulnerability that we believe may be a false positive. The message says:

HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)

But none of these cases apply. The WebKit bug is https://bugs.webkit.org/show_bug.cgi?id=186980.

We believe *the shadow memory might not be properly initialized*. There is a description of some assembler-level debugging in comment 24 on the WebKit bug, https://bugs.webkit.org/show_bug.cgi?id=186980#c24, which explains the suspected issue here. The other comments in the bug are probably not interesting.

This issue does not occur with GCC 7, so we believe it is a regression in GCC 8.


Version-Release number of selected component (if applicable): 8.1.1-1.fc28


How reproducible: Always


Steps to Reproduce:

Unfortunately we do not have a reduction, so to reproduce you would need to actually build WebKit, following the instructions at https://trac.webkit.org/wiki/BuildingGtk to build from git. After downloading the code, you will need to manually revert https://trac.webkit.org/changeset/233405/webkit, which I committed to work around this issue. Then, before running the 'build-webkit' script, run 'set-webkit-configuration --debug --asan'. After building, run 'run-minibrowser --gtk' and try to load http://www.example.com.

I understand it's probably way too much work to reproduce, but it's also too much work for us to try to get a reduction, sorry. :( I figured some bug report might be better than none.


Actual results: asan complains about stack-use-after-scope


Expected results: no such complaint


Additional info:

In case it might be helpful, here is the complete preprocessed source of the affected file (which is huge, sorry, as it's a concatenation of eight actual source files):

https://bug-186980-attachments.webkit.org/attachment.cgi?id=344030

And the corresponding generated assembly:

https://bug-186980-attachments.webkit.org/attachment.cgi?id=344031

Comment 1 Ben Cotton 2019-05-02 19:23:15 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2019-05-02 21:16:14 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ben Cotton 2019-05-28 21:56:16 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.