Skip to content
Access control Disclosed report Advanced

Ubuntu Linux privilege escalation (dirty_sock)

The snapd service shipped by default on Ubuntu Linux contained a local privilege escalation flaw. Any local user could exploit it to gain immediate root access, breaking the multi-user security model.

Chris Moberly Follow

Originally disclosed on HackerOne

High 7.8 View original
  • Triaged in 57 days
  • Fixed in 6 months
  • Paid in 6 months
  • Disclosed after 6 months

Hi team, This week, I have publicly disclosed the dirty_sock local root exploit affecting multiple Linux Operating Systems.

Very detailed information on the vulnerability can be found in my blog posting here.

And the exploit code can be found in my GitHub repository here.

The vulnerability exists in stock versions of Ubuntu Linux due to the default inclusion of the snapd service, but all Linux distributions are vulnerable if they install the package. The disclosure was handled directly with Canonical via the bug tracked here.

A large percentage of the Internet is safer today than it was a week ago, due to the amazing response by the team at Canonical.

Impact

Linux relies on a functioning security model, particularly in environments shared by multiple users. The ability of any user to obtain immediate root access completely breaks this model, putting sensitive data all around the world at risk of exposure.

The exploits provided allow any user to immediately elevate to a root account.

The original report as published on HackerOne, by initstring. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a flaw in the snapd service that allowed a local user to escalate privileges to root.

Impact

Any local user could immediately gain root access, putting sensitive data at risk; the text does not describe any defence that limited the exploit.

What the attacker needed

Local user account on affected system; snapd installed (default on Ubuntu)

The fix

The issue was handled with Canonical, whose response the text credits.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

On Linux, a normal user account is not supposed to be able to become the administrator account (called root) without permission. This report says a background service called snapd, which comes pre-installed on Ubuntu, had a mistake that let any logged-in user become root straight away. That means they could read or change anything on the machine.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Chris Moberly

View all

2 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.