New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 693709 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 82385



Sign in to add a comment

lld-link doesn't understand /guard:cf

Project Member Reported by thakis@chromium.org, Feb 17 2017

Issue description

https://codereview.chromium.org/2693193005 started unconditionally passing /guard:cf to the linker.

We need to

1) add support for that to lld
2) in the meantime, but that behind a !use_lld check


 
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/390d2eb8431b01a37bd96831ab8ee210fd73bdcb

commit 390d2eb8431b01a37bd96831ab8ee210fd73bdcb
Author: thakis <thakis@chromium.org>
Date: Wed Feb 22 01:18:31 2017

win: Don't pass /guard:cf to lld for now

It doesn't understand the flag yet.

BUG= 693709 
NOTRY=true

Review-Url: https://codereview.chromium.org/2702583004
Cr-Commit-Position: refs/heads/master@{#451867}

[modify] https://crrev.com/390d2eb8431b01a37bd96831ab8ee210fd73bdcb/build/config/win/BUILD.gn

Comment 3 by r...@chromium.org, Jan 23 2018

Cc: -r...@chromium.org amccarth@chromium.org inglorion@chromium.org
Owner: r...@chromium.org
Status: Assigned (was: Untriaged)
I have a work in progress patch for implementing /guard:cf in LLD.

Comment 4 by r...@chromium.org, Feb 13 2018

Part of this landed: https://reviews.llvm.org/D42592
Longjmp protection is in review: https://reviews.llvm.org/D43217

After that, we need to implement delayload IAT protection, but once longjmp protection is rolled into clang we can remove the !use_lld check in the cfi_linker gn config.

Comment 5 by r...@chromium.org, Feb 14 2018

Blocking: 792131
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d463a9c847bfad6c24b5e42de1fc58d1c03f60fc

commit d463a9c847bfad6c24b5e42de1fc58d1c03f60fc
Author: Nico Weber <thakis@chromium.org>
Date: Thu Mar 01 01:16:57 2018

Pass /guard:cf,nolongjmp to lld now that it has some support for it.

Bug:  693709 
Change-Id: I4e846d36fac5ca170c47c8e20906b0cf2715fbf5
Reviewed-on: https://chromium-review.googlesource.com/941904
Reviewed-by: Reid Kleckner <rnk@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539968}
[modify] https://crrev.com/d463a9c847bfad6c24b5e42de1fc58d1c03f60fc/build/config/win/BUILD.gn

Comment 7 by thakis@chromium.org, Mar 28 2018

rnk: did you talk to pennymac about the missing CGF bits and if they're critical?

Comment 8 by r...@chromium.org, Mar 28 2018

Oops, no, the delayload IAT protection got lost along the way.
Blocking: -792131
We talked to security folks, they say delayload IAT protection isn't blocking.

Comment 10 by r...@chromium.org, Jun 20 2018

This is still valid, we should do IAT protection at some point.

Comment 11 by r...@chromium.org, Jun 20 2018

Status: Fixed (was: Assigned)
Actually, let me open a new bug for that and close this one: https://crbug.com/854771 is the new IAT bug. LLD does understand /guard:cf, and that's what this bug was about.

Sign in to add a comment