CVE-2022-1348

Publication date 25 May 2022

Last updated 25 August 2025


Ubuntu priority

Cvss 3 Severity Score

6.5 · Medium

Score breakdown

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.

Read the notes from the security team

Status

Package Ubuntu Release Status
logrotate 23.04 lunar
Not affected
22.10 kinetic
Fixed 3.20.1-1ubuntu1
22.04 LTS jammy
Fixed 3.19.0-1ubuntu1.1
21.10 impish
Fixed 3.18.0-2ubuntu1.1
20.04 LTS focal
Not affected
18.04 LTS bionic
Not affected
16.04 LTS xenial
Not affected
14.04 LTS trusty
Not affected

Notes


alexmurray

Only affects logrotate >= 3.17.0


mdeslaur

Ubuntu packages build with: --with-state-file-path=/var/lib/logrotate/status but the /var/lib/logrotate directory itself is 755, so a user can get a lock on the file. See follow-up pull request with additional fix

Patch details

For informational purposes only. We recommend not to cherry-pick updates. How can I get the fixes?

Package Patch details
logrotate

Severity score breakdown

CVSS version: CVSS v3.0

Base score 6.5 · Medium

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H


Access our resources on patching vulnerabilities