CVE-2020-36770
Linux Gentoo vulnerability analysis and mitigation

Overview

CVE-2020-36770 affects the Gentoo ebuild for Slurm through version 22.05.3. The vulnerability exists in the pkg_postinst function which unnecessarily calls chown to assign root's ownership on files in the live root filesystem. This vulnerability was discovered in 2017 and publicly disclosed in January 2024 (NVD, Gentoo Bug).

Technical details

The vulnerability stems from the pkg_postinst() function in the Slurm ebuild which uses 'chown -R' recursively on directories in the live root filesystem. If a hard link pointing to a root-owned file is placed in one of the affected paths by the slurm user, when Slurm is reinstalled or upgraded, the chown command will affect the target of the link and give ownership of the file to slurm:slurm. This creates a privilege escalation path (Gentoo Bug).

Impact

This vulnerability allows the slurm user to gain root privileges by exploiting the recursive chown operation during package installation or upgrade. An attacker with slurm user access could take ownership of root-owned files, effectively escalating their privileges on the system (NVD).

Mitigation and workarounds

The vulnerability was initially addressed by removing the recursive (-R) flag from the chown command in the ebuild. However, this fix was deemed insufficient as the package was still vulnerable upon reinstallation. The ultimate resolution involved removing the affected versions from the Gentoo tree and later reintroducing a fixed version 24.05.3 that handles directory permissions properly (Gentoo Bug).

Additional resources


SourceThis report was generated using AI

Related Linux Gentoo vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-13470HIGH7.7
  • Linux DebianLinux Debian
  • rnp
NoYesNov 21, 2025
CVE-2025-65018HIGH7.1
  • NixOSNixOS
  • libpng-devel-debuginfo
NoYesNov 25, 2025
CVE-2025-64720HIGH7.1
  • NixOSNixOS
  • java-25-openjdk-headless
NoYesNov 25, 2025
CVE-2025-64506MEDIUM6.1
  • NixOSNixOS
  • java-17-openjdk-jmods
NoYesNov 25, 2025
CVE-2025-64505MEDIUM6.1
  • NixOSNixOS
  • libpng16-tools
NoYesNov 25, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management