-
Notifications
You must be signed in to change notification settings - Fork 50
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
CVE-2018-0492 #11
Comments
The package listed at this URL appears to contain a patch that resolves the vulnerability. Going straight to the debian package that fixed it did not have a patch, just a diff, so I figured this would be a quicker find/implementation. |
The diff seems to be this one:
...still a bit weird that Debian/Ubuntu fix stuff without opening PRs here. Hopefully they contacted the author in private at least. |
Ubuntu actually had an additional patch as well that covered handling one of the system SIGNALs. |
There is no activity on this Github account since June 2016, and no activity on this particular repository since 2013. I don't think this is the place to fix the code... |
I wonder if people will understand that |
I don't understand where does this race condition come from, The code of this program is ugly and the Oh maybe the |
Where else would it be? Debian/Ubuntu lists http://johnath.com/beep/ as upstream and that page links to this repository. At the very least, the patches by Debian/Ubuntu should have been submitted as pull requests. |
Just my 2 cents and pure speculation:
Since it is stated that this is a race condition, it has to do with the signal handler - no other race to see here. Therefore, we have a use-after-free situation with
In order to not having a multiple use-after-free of |
The signal handler don't call |
Maybe it has to do with calling |
The report says it's an issue when privilege escalated, so just thinking in
the context of normal execution isn't enough.
…On Wed, Apr 4, 2018, 7:22 AM LangerJan ***@***.***> wrote:
Maybe it has to do with calling free() inside the signal handler, which
is not considered an async-signal-safe function.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABDnWSgDR72weEQk4Tbl1aRQ-1699YD0ks5tlNcOgaJpZM4TE6O7>
.
|
I think the exploit could have a great educational value here. EDIT: |
It's possible that there is no actual priv esc. I will try to reach out to lamb. |
Bug: https://bugs.gentoo.org/652330 See-Also: johnath/beep#11 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Here is an interesting article which explained the problem to me: http://lcamtuf.coredump.cx/signals.txt
|
On Hacker News, terom wrote:
|
Thank you very much @LangerJan and @jwilk - both those were very informative and provides a very clear and detailed understanding of the problem. The patch resolves the double free and the uninitialized parts of the struct. It seems that do_beep can still be re-entered - likely no longer a security vuln but perhaps still room for improvement by following the programming guidelines at the end of lcamtufs document. |
Disclaimer: this is just speculation on my part based on the changes in the patch... I may have misunderstood something, I didn't verify any of those assumptions. |
There's an additional minor issue, even with the AFAIK the effect is only to disclose whether that file exists plus some information about its file type, via the error message. If the file is in a directory not accessible to the calling user then this represents an information leak. However if there's such a thing as a file (e.g. a device file or something strange in |
Opening tape devices or named pipes can have side effects. |
This also allows an attacker to inhibit the execution of arbitrary programs. For instance, running |
I've done a blog post about my interpretation, explanations and exploit of this security flaw, in case one of you is interested. You can find it here. Thanks. |
My try at fixing this over at the beep fork I use for packaging for Fedora is as follows:
|
This check if susceptible to directory traversal. The attacker can use dot-dot sequences to bypass the check: |
it's better to not make the binary SUID |
I can see now why the evdev So the priority for
Now the permission setup needs to be automated with whatever hooks the respective system offers for that (distro packagers' job), and Are there other device names for the PC speaker than |
Gnarg. Thank you. Added |
realpath() can be abused to leak information about otherwise-inaccessible files.
I think you should outright forbid |
Symlinks to those files have no The best way appears to forbid running Removing the |
…2018-1000532 Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532
Given the lack of activity in this code repositiory since 2013, I have taken up the codebase, fixed a number of issues including the two CVEs (CVE-2018-0492 and CVE-2018-1000532) we have discussed here, and put it up on https://github.com/spkr-beep/beep with release 1.4.2 being current. |
…2018-1000532 Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 Signed-off-by: Josef Schlehofer <[email protected]>
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]>
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]>
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]> (cherry picked from commit 6488eaf)
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]> (cherry picked from commit 6488eaf)
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]> (cherry picked from commit 6488eaf)
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]> (cherry picked from commit 6488eaf)
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]>
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]> (cherry picked from commit 6488eaf)
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]> (cherry picked from commit 6488eaf)
1. Changed Git repository, which is used for Fedora packaging johnath/beep#11 (comment) Fixed CVEs: CVE-2018-0492 - https://nvd.nist.gov/vuln/detail/CVE-2018-0492 CVE-2018-1000532 - https://nvd.nist.gov/vuln/detail/CVE-2018-1000532 2. Fixed SPDX License Identifier 3. Add patch to comment out -D_FORTIFY_SOURCE Otherwise, it can not be built by default. Signed-off-by: Josef Schlehofer <[email protected]> (cherry picked from commit 6488eaf)
Just a short heads-up:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-0492
The text was updated successfully, but these errors were encountered: