-
Notifications
You must be signed in to change notification settings - Fork 936
Libevent/10542 CVE fixes v4.1.x #10565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libevent/10542 CVE fixes v4.1.x #10565
Conversation
bwbarrett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicitly nacking so that we don't merge this without discussion. I do not believe that we should take one-off patches. We should either update libevent to one without the CVE issues or (since we never actually build the code in question) just ignore the problem. But strapping in more custom patches goes against everything we've been trying to do with libevent and Open MPI.
I am in agreement in that I do not like creating a version of libevent in ompi/v4.1.x and ompi/v4.0.x that did not exist in the libevent repo. I have not assessed the extent of the changes between the current ompi/v4.1.x libevent copy and the first stable libevent after that contains the fixes. 2 of the 3 CVEs addressed by this PR are in evdns.c. evdns.c does not get compiled when I do The third CVE is in evutil.c, |
|
Is this a libevent configure option to disable the DNS code, perchance? |
Yes, libevent has a configure option And this carries over to libevent2022/libevent configure when doing |
|
@BrendanCunningham Does |
|
Refs: #10583 |
|
@BrendanCunningham Ping. |
|
@BrendanCunningham (and @artemry-nv, from #10583) How did your internal scanner find this issue? Do we know that patching libevent will actually make your scanners happy? Or are the scanners just seeing "libevent 1.0.22" and therefore flagging it? I ask because if the scanner is just flagging the libevent version, then this PR won't be sufficient. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@BrendanCunningham after discussing options with Jeff, we're leaning towards accepting this PR if we can confirm that the scanners will be happy with Open MPI after this patch. However, can you update the Signed-off-by lines in the three patches to include a valid email address, that would be helpful. As would be a short note on the patches sourcing their origin would be awesome. In the case of third party packages like this, its unreasonable to have the author add the signd-off-by, so you doing so is the right thing to do. I would also remove the Fixes lines to avoid GitHub getting confused. |
I don't have access to that scanner now. I think it must have done something beyond checking for a version string since the fix we used for our build of OMPI for the hits in |
The third CVE hit is in |
|
@BrendanCunningham So there's three proposed solutions:
Also, I'll ask you the same questions I asked @artemry-nv on #10583:
|
We have a newer scanner now; it might be smart enough to realize none of the vulnerable code is actually present or callable. I'm working with one of our CI devs right now to determine the answer to this. I'll get back to you on this.
Yes, we will test if the PR fixes the CVE hits according to our scanner. I'll fix up my commits as requested.
Our scanner did not suddenly find this; we had found this a few years back when OPA was maintained by Intel and had a report on file. We only recently realized we should fix this in upstream rather than just carrying our fixes from OMPI release to OMPI release.
Not urgent; we do not have a customer complaining about it. And as we've established, none of the vulnerable code is actually live, so we can defend this if we had to. |
b22f642 to
8cc9cce
Compare
@BrendanCunningham Have you been able to do this yet, perchance? |
Have not, no. |
@BrendanCunningham Do you have an ETA to when you can figure out if this PR actually makes your scanner happy? |
Should be able to answer this by end of next week. |
|
@jsquyres we ran our scanner against both our OpenMPI 4.1.4 build with our CVE fixes and Open MPI 4.1.4 built from the openmpi-4.1.4-1.src.rpm. Our CVE scanner did not report any CVEs in either Open MPI build. EDIT: After this post, we discussed the issue on the weekly OMPI dev Tuesday Webex, and unfortunately the issue is not as clear cut as it initially appeared; there may be cases where there scanner does still detect the CVE. @BrendanCunningham is still investigating, and will post back here shortly. |
@jsquyres after further research, we believe our latest libevent CVE negatives to be true-negatives; our scanner did not find CVEs in Open MPI 4.1.4 either with or without the libevent CVE fixes. |
Cool. I'm going to close this PR without merging, then. Still waiting to hear back from NVIDIA on #10583 -- we can re-open this PR if we need to. |
8cc9cce to
1019467
Compare
…i#10542. CVE: https://nvd.nist.gov/vuln/detail/CVE-2016-10195 libevent issue: libevent dns remote stack overread vulnerability libevent/libevent#317 libevent fixing commit: libevent/libevent@96f64a0 CVE: https://nvd.nist.gov/vuln/detail/CVE-2016-10196 libevent issue: libevent (stack) buffer overflow in evutil_parse_sockaddr_port() libevent/libevent#318 libevent fixing commit: libevent/libevent@329acc1 CVE: https://nvd.nist.gov/vuln/detail/CVE-2016-10197 libevent issue: out-of-bounds read in search_make_new() libevent/libevent#332 libevent fixing commit: libevent/libevent@ec65c42 Signed-off-by: Brendan Cunningham <[email protected]>
1019467 to
a65aaad
Compare
|
After much discussion and back-n-forth, we are re-opening this PR. Per #10583 (comment), it looks like the Black Duck scanner is going to report this CVE even if we apply these patches. And we know that these patches are unused / very low risk in the Open MPI code base. Also, we tried in #10602 to upgrade the Libevent on this branch, but that also turned into a giant tar pit of sadness. So it seems like the easiest and most responsible thing to do is just apply these upstream patches (even though we really don't like applying patches to our 3rd-party software), be able to state that we have fixed the CVE (even though they don't really apply), accept that Black Duck will still complain anyway, and move on to other things. I therefore rebased this PR to the current HEAD of the v4.1.x branch (mainly to get rid of the failed Git Commit Checker CI test that failed against the old GitHub Actions pull_request target), and we'll let CI run |
|
There's something weird about why the RTD CI test is getting an error from git cloning/checking out this PR; I can't figure out why that would be happening. Best guess is that it has something to do with how this PR was closed for a long time, and just re-opened recently. 🤷♂️ I have pushed the commit from this PR to my own fork and opened #10835; the RTD CI test passed there. 🤷♂️ So I'm going to close this PR and switch to the #10835 PR. |
I'd appreciate feedback on the following in particular:
bot:notacherrypick