Skip to content

amd-s2idle: Drop group-writable /var/local database fallback#54

Open
superm1 wants to merge 1 commit into
masterfrom
superm1/SWSPLAT-23307
Open

amd-s2idle: Drop group-writable /var/local database fallback#54
superm1 wants to merge 1 commit into
masterfrom
superm1/SWSPLAT-23307

Conversation

@superm1

@superm1 superm1 commented Jul 10, 2026

Copy link
Copy Markdown
Owner

probe

The sleep database location previously fell back to
/var/local/lib/amd-s2idle when /var/lib/amd-s2idle did not exist. On
Debian-derived systems /var/local is group-staff writable (mode 2775),
which would let a non-root user in the staff group pre-plant a poisoned
data.db or a symlink there. The root systemd sleep hook would then open
that attacker-controlled file.

Always use /var/lib/amd-s2idle and create it with a restrictive 0o700
mode. The tool runs as root when it needs this path, so no fallback is
required.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant