Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 631680 (CVE-2017-14609) - app-mobilephone/kannel: privilege escalation via PID file manipulation
Summary: app-mobilephone/kannel: privilege escalation via PID file manipulation
Status: RESOLVED FIXED
Alias: CVE-2017-14609
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Gentoo Security
URL: https://redmine.kannel.org/issues/771
Whiteboard: C3 [noglsa cve]
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2017-09-22 00:11 UTC by Michael Orlitzky
Modified: 2020-08-04 01:15 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2017-09-22 00:11:47 UTC
The Kannel daemons create their PID files after dropping privileges to a non-root user. That may be exploited (through init scripts or other management tools) by the unprivileged user to kill root processes, since when a daemon is stopped, root usually sends a SIGTERM to the contents of its PID file (which are under the control of the runtime user).

Our OpenRC init scripts suffer from this vulnerability.

I did actually get a response from upstream on this (see the bug report), but so far he's not convinced that my proposed solution is the right one. On the other hand, Kannel ships two vulnerable debian/*.init scripts, so punting to the init script author isn't a no-effort option for them. We can wait and see what happens.

If the bug sits on the vine for too long, we do have a workaround available: run the daemon in the foreground, and have it write the PID files somewhere where they will be completely ignored. Then, have OpenRC background the processes and manage their real PID files (which happens securely) under /run.
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2020-06-14 00:19:26 UTC
This doesn't seem to have been maintained since Gentoo converted to Git. CCing treecleaners.