<div dir="ltr"><div dir="ltr">I think it's great to make a policy for reporting security bugs.<div><br></div><div>But first, yes, we need to be clear as to what sorts of things we consider as "security bugs", and what we do not. We need to be clear on this, both for users to know what they should depend on, and for LLVM contributors to know when they should be raising a flag, if they discover or fix something themselves.</div><div><br></div><div><div><div>We could just keep on doing our usual development process, and respond only to <i>externally-reported</i> issues with the security-response routine. But I don't think that would be a good idea. Creating a process whereby anyone outside the project can report security issues, and for which we'll coordinate disclosure and create backports and such is all well and good...but if we don't then also do (or at least <i>try</i> to do!) the same for issues discovered and fixed within the community, is there even a point?</div><div><br></div><div>So, if we're going to expand what we consider a security bug beyond the present "effectively nothing", I think it is really important to be a bit more precise about what it's being expanded to.</div><div><br></div><div></div></div><div>For example, I think it should generally be agreed that a bug in Clang which allows arbitrary-code-execution in the compiler, given a specially crafted source-file, should not be considered a security issue. A bug, yes, but not a security issue, because we do not consider the use-case of running the compiler in privileged context to be a supported operation. But also the same for parsing a source-file into a clang AST -- which might even happen automatically with editor integration. Seems less obviously correct, but, still, the reality today. And, IMO, the same stance should also apply to feeding arbitrary bitcode into LLVM. (And I get the unfortunate feeling that last statement might not find universal agreement.)</div><div><br></div><div>Given the current architecture and state of the project, I think it would be rather unwise to pretend that any of those are secure operations, or to try to support them as such with a security response process. Many compiler crashes seem likely to be security bugs, if someone is trying hard enough. If every time such a bug was fixed, it got a full security-response triggered, with embargos, CVEs, backports, etc...that just seems unsustainable. Maybe it would be <i>nice</i> to support this, but I think we're a long way from there currently.</div></div><div><br></div><div><br></div><div>However, all that said -- based on timing and recent events, perhaps your primary goal here is to establish a process for discussing LLVM patches to workaround not-yet-public CPU errata, and issues of that nature. In that case, the need for the security response group is primarily to allow developing quality LLVM patches based on not-yet-public information about other people's products. That seems like a very useful thing to formalize, indeed, and doesn't need any changes in llvm developers' thinking. So if that's what we're talking about, let's be clear about it.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 18, 2019 at 2:43 PM Chris Bieneman via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hey JF,<div><br></div><div>Thanks for putting this RFC together. LLVM security issues are very important, and I'm really glad someone is focusing attention here.</div><div><br></div><div>I'm generally in agreement with much of what you have proposed. I do have a few thoughts I'd like to bring up.</div><div><br></div><div>Having the group appointed by the board seems a bit odd to me. Historically the board has not involved itself technical processes. I'm curious what the board's thoughts are relating to this level of involvement in project direction (I know you wanted proposal feedback on Phabricator, but I think the role of the board is something worth discussing here).</div><div><br></div><div>My other meta thought is about focus and direction for the group. How do you define security issues?</div><div><br></div><div>To give you where I'm coming from. One of the big concerns I have at the moment is about running LLVM in secure execution contexts, where we care about bugs in the compiler that could influence code generation, not just the code generation itself. Historically, I believe, the security focus of LLVM has primarily been on generated code, do you see this group tackling both sides of the problem?</div><div><br></div><div>Thanks,</div><div>-Chris</div><div><div><br><blockquote type="cite"><div>On Nov 15, 2019, at 10:58 AM, JF Bastien via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><div style="overflow-wrap: break-word;"><h1><span style="font-weight:normal;font-size:12px"><font face="HelveticaNeue">Hello compiler enthusiasts,</font></span></h1><font face="HelveticaNeue"><span><div><font face="HelveticaNeue"><span><br></span></font></div>The Apple LLVM team would like to propose that a new a security process and an associated private LLVM Security Group be created under the umbrella of the LLVM project.</span><br><br><span>A draft proposal for how we could organize such a group and what its process could be is </span></font><a href="https://reviews.llvm.org/D70326" target="_blank">available on Phabricator</a><font face="HelveticaNeue"><span>. The proposal starts with a list of goals for the process and Security Group, repeated here:</span><br><br><span>The LLVM Security Group has the following goals:</span><br></font><ol><li><font face="HelveticaNeue">Allow LLVM contributors and security researchers to disclose security-related issues affecting the LLVM project to members of the LLVM community.</font></li><li><font face="HelveticaNeue">Organize fixes, code reviews, and release management for said issues.</font></li><li><font face="HelveticaNeue">Allow distributors time to investigate and deploy fixes before wide dissemination of vulnerabilities or mitigation shortcomings.</font></li><li><font face="HelveticaNeue">Ensure timely notification and release to vendors who package and distribute LLVM-based toolchains and projects.</font></li><li><font face="HelveticaNeue">Ensure timely notification to users of LLVM-based toolchains whose compiled code is security-sensitive, through <a href="https://cve.mitre.org/" target="_blank">the CVE process</a>.</font></li></ol><font face="HelveticaNeue"><br><span>We’re looking for answers to the following questions:</span><br></font><ol><li><font face="HelveticaNeue"><u>On this list</u>: Should we create a security group and process?</font></li><li><font face="HelveticaNeue"><u>On this list</u>: Do you agree with the goals listed in the proposal?</font></li><li><font face="HelveticaNeue"><u>On this list</u>: at a high-level, what do you think should be done differently, and what do you think is exactly right in the draft proposal?</font></li><li><font face="HelveticaNeue"><u>On the Phabricator code review</u>: going into specific details, what do you think should be done differently, and what do you think is exactly right in the draft proposal?</font></li><li><font face="HelveticaNeue"><u>On this list</u>: to help understand where you’re coming from with your feedback, it would be helpful to state how you personally approach this issue:</font></li><ol><li><font face="HelveticaNeue">Are you an LLVM contributor (individual or representing a company)?</font></li><li><font face="HelveticaNeue">Are you involved with security aspects of LLVM (if so, which)?</font></li><li><font face="HelveticaNeue">Do you maintain significant downstream LLVM changes?</font></li><li><font face="HelveticaNeue">Do you package and deploy LLVM for others to use (if so, to how many people)?</font></li><li><font face="HelveticaNeue">Is your LLVM distribution based on the open-source releases?</font></li><li><font face="HelveticaNeue">How often do you usually deploy LLVM?</font></li><li><font face="HelveticaNeue">How fast can you deploy an update?</font></li><li><font face="HelveticaNeue">Does your LLVM distribution handle untrusted inputs, and what kind?</font></li><li><font face="HelveticaNeue">What’s the threat model for your LLVM distribution?</font></li></ol></ol><font face="HelveticaNeue"><br><span>Other open-source projects have security-related groups and processes. They structure their group very differently from one another. This proposal borrows from some of these projects’ processes. A few examples:</span><br></font><ul><li><a href="https://webkit.org/security-policy/" target="_blank"><font face="HelveticaNeue">https://webkit.org/security-policy/</font></a></li><li><a href="https://chromium.googlesource.com/chromium/src/+/lkgr/docs/security/faq.md" target="_blank"><font face="HelveticaNeue">https://chromium.googlesource.com/chromium/src/+/lkgr/docs/security/faq.md</font></a></li><li><a href="https://wiki.mozilla.org/Security" target="_blank"><font face="HelveticaNeue">https://wiki.mozilla.org/Security</font></a></li><li><a href="https://www.openbsd.org/security.html" target="_blank"><font face="HelveticaNeue">https://www.openbsd.org/security.html</font></a></li><li><a href="https://security-team.debian.org/security_tracker.html" target="_blank"><font face="HelveticaNeue">https://security-team.debian.org/security_tracker.html</font></a></li><li><a href="https://www.python.org/news/security/" target="_blank"><font face="HelveticaNeue">https://www.python.org/news/security/</font></a></li></ul><font face="HelveticaNeue"><span>When providing feedback, it would be great to hear if you’ve dealt with these or other projects’ processes, what works well, and what can be done better.</span><br><br><br><span>I’ll go first in answering my own questions above:</span><br></font><ol><li><font face="HelveticaNeue">Yes! We should create a security group and process.</font></li><li><font face="HelveticaNeue">We agree with the goals listed.</font></li><li><font face="HelveticaNeue">We think the proposal is exactly right, but would like to hear the community’s opinions.</font></li><li><font face="HelveticaNeue">Here’s how we approach the security of LLVM:</font></li><ol><li><font face="HelveticaNeue">I contribute to LLVM as an Apple employee.</font></li><li><font face="HelveticaNeue">I’ve been involved in a variety of LLVM security issues, from automatic variable initialization to security-related diagnostics, as well as deploying these mitigations to internal codebases.</font></li><li><font face="HelveticaNeue">We maintain significant downstream changes.</font></li><li><font face="HelveticaNeue">We package and deploy LLVM, both internally and externally, for a variety of purposes, including the clang, Swift, and mobile GPU shader compilers.</font></li><li><font face="HelveticaNeue">Our LLVM distribution is not directly derived from the open-source release. In all cases, all non-upstream public patches for our releases are available in repository branches at <a href="https://github.com/apple" target="_blank">https://github.com/apple</a>.</font></li><li><font face="HelveticaNeue">We have many deployments of LLVM whose release schedules vary significantly. The LLVM build deployed as part of Xcode historically has one major release per year, followed by roughly one minor release every 2 months. Other releases of LLVM are also security-sensitive and don’t follow the same schedule.</font></li><li><font face="HelveticaNeue">This depends on which release of LLVM is affected.</font></li><li><font face="HelveticaNeue">Yes, our distribution sometimes handles untrusted input.</font></li><li><font face="HelveticaNeue">The threat model is highly variable depending on the particular language front-ends being considered.</font></li></ol></ol><font face="HelveticaNeue"><span>Apple is involved with a variety of open-source projects and their disclosures. For example, we frequently work with the WebKit community to handle security issues through their process.</span><br><br><br><span>Thanks,</span><br><br><span>JF</span></font><br><div><font face="HelveticaNeue"><span><br></span></font></div></div>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>