Name | CVE-2022-1348 |
Description | A vulnerability was found in logrotate in how the state file is created. The state file is used to prevent parallel executions of multiple instances of logrotate by acquiring and releasing a file lock. When the state file does not exist, it is created with world-readable permission, allowing an unprivileged user to lock the state file, stopping any rotation. This flaw affects logrotate versions before 3.20.0. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Debian Bugs | 1011644 |
Vulnerable and fixed packages
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|
logrotate (PTS) | jessie | 3.8.7-1 | fixed |
| stretch | 3.11.0-0.1 | fixed |
| buster | 3.14.0-4 | fixed |
| bullseye | 3.18.0-2+deb11u2 | fixed |
| bookworm | 3.21.0-1 | fixed |
| sid, trixie | 3.22.0-1 | fixed |
The information below is based on the following data on fixed versions.
Notes
[buster] - logrotate <not-affected> (Vulnerable code introduced later)
[stretch] - logrotate <not-affected> (Vulnerable code introduced later)
https://www.openwall.com/lists/oss-security/2022/05/25/3
Introduced by: https://github.com/logrotate/logrotate/commit/f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25 (3.17.0)
https://github.com/logrotate/logrotate/pull/446
Fixed by: https://github.com/logrotate/logrotate/commit/1f76a381e2caa0603ae3dbc51ed0f1aa0d6658b9 (3.20.0)
Fixed by: https://github.com/logrotate/logrotate/commit/addbd293242b0b78aa54f054e6c1d249451f137d (3.20.1)
Packages are built with --with-state-file-path=/var/lib/logrotate/status
but /var/lib/logrotate has 0755 permissions, allowing a user to aquire a lock on the file.
[jessie] - logrotate <not-affected> (Vulnerable code introduced later)