Skip to content
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-2020-26880] root privilege escalation from user sympa by modifying sympa.conf #1009

Closed
Beuc opened this issue Oct 7, 2020 · 7 comments
Labels
Milestone

Comments

@Beuc
Copy link

Beuc commented Oct 7, 2020

Note by admin: this issue is dedicated to measures against CVE-2020-26880.


Version

any

Installation method

any

Expected behavior

user 'sympa' only execute specific tasks as root and cannot gain more privileges, following the principles of privileges separation

Actual behavior

user 'sympa' can obtain full root shell access

Additional information

Following up on #943 (comment)

A more concrete vulnerability you document in your patch, is that sympa.conf (as well as its entire directory) is owned by user 'sympa', so an attacker who compromised [the 'sympa' user] can directly edit the main [sympa.conf] and escalate to root.

Given that the configuration file is parsed as root through the setuid sympa_newaliases-wrapper, and can execute arbitrary commands through its backticks syntax, there is an unintentional privilege escalation from sympa to full root shell access.

The information is public in the aforementioned thread hence this bug introduce no confidential information and is reported publicly as well.
(This also allows for CVE assignment for small projects without a CNA able to run a full embargo procedure.)

Mitigations include replacing sympa_newaliases-wrapper by an alternate alias manager, see e.g. https://tribut.de/blog/sympa-and-postfix .

Credits goes to @lightsey .

@ikedas
Copy link
Member

ikedas commented Oct 7, 2020

Hi @Beuc ,
Please e-mail me. I want to talk with you privately.

@ikedas ikedas added the security label Oct 7, 2020
@ikedas ikedas changed the title root privilege escalation from user sympa by modifying sympa.conf [CVE-2020-26880] root privilege escalation from user sympa by modifying sympa.conf Oct 8, 2020
@Beuc
Copy link
Author

Beuc commented Oct 8, 2020

To clarify, the backticks syntax is the most trivial method, but probably not the only one.

The core issue identified here, is running sympa as root with a configuration file modified by the attacker.

@ikedas
Copy link
Member

ikedas commented Oct 8, 2020

To clarify, the backticks syntax is the most trivial method, but probably not the only one.

The core issue identified here, is running sympa as root with a configuration file modified by the attacker.

Which is the core issue, either that Sympa is running as root or that a configuration file is modified by the attacker?


EDIT: @Beuc, I received your mail. I understood the core issue is that
Sympa is running as root even when it should not.

@Beuc
Copy link
Author

Beuc commented Oct 9, 2020

This was assigned CVE-2020-26880.
(It tracks the combination of both.)

I agree with your understanding.
For clarity here, what I suggested in my mail is to only run /usr/bin/newaliases as root (rather than sympa itself).

Note: I'm acting here as a Debian LTS contributor, so my purpose is to track a known security issue to ensure it will get fixed in Debian eventually, a code audit from an IT security professional would be the proper way to clarify this and get advice on other possible issues in sympa :)

@ikedas
Copy link
Member

ikedas commented Oct 9, 2020

n.b. This issue #1009 will be treated as the meta-issue while particular measures and analyses will be discussed elsewhere (e.g. #946).

Note: I'm acting here as a Debian LTS contributor, so my purpose is to track a known security issue to ensure it will get fixed in Debian eventually, a code audit from an IT security professional would be the proper way to clarify this and get advice on other possible issues in sympa :)

I understand that. @Beuc, thank you for addressing the point!

@racke
Copy link
Contributor

racke commented Jan 19, 2021

See also #1086.

@ikedas
Copy link
Member

ikedas commented Apr 24, 2021

I understand #946 & #1086 fix this issue. I'll close it.

@ikedas ikedas closed this as completed Apr 24, 2021
@ikedas ikedas unpinned this issue Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants