Backports and version numbers: why 9.2p1-2+deb12u3 is fixed
The CVE record of regreSSHion says OpenSSH 8.5p1 up to 9.7p1 is affected and 9.8p1 fixes it. A fully patched Debian 12 server still runs OpenSSH 9.2p1, and it is not vulnerable. Stable distributions copy the fix into the version they ship instead of moving to a new upstream release. The package version of your distribution, not the upstream version, tells you whether a CVE is fixed on your server.
Why distributions backport
A stable release such as Debian 12, Ubuntu 24.04 or RHEL 9 promises that updates do not change behaviour. Moving OpenSSH from 9.2 to 9.8 in the middle of a release would change defaults, options and output. So the security team takes the patch for the bug, applies it to 9.2p1 and publishes a new package revision. The upstream part of the version stays the same; the distribution part changes.
Reading the version strings
Debian and Ubuntu use [epoch:]upstream_version-debian_revision:
1:9.2p1-2+deb12u3
│ │ │ └── third stable update for Debian 12
│ │ └──── Debian packaging revision 2
│ └────────── upstream OpenSSH 9.2p1
└──────────── epoch 1
The epoch lets a package start a new numbering scheme: a version with a higher epoch is always newer, whatever follows it. +deb12u3 marks an update in Debian 12 stable. Ubuntu uses suffixes such as ubuntu0.10 (1:8.9p1-3ubuntu0.10 on Ubuntu 22.04).
RHEL, Rocky, Alma use name-version-release: openssh-8.7p1-38.el9_4.1 is upstream 8.7p1, Red Hat release 38, built for RHEL 9.4 with update 1.
Compare versions only with the tool of the distribution. Plain string or semantic version comparison gives wrong answers. On Debian 12:
dpkg --compare-versions 1:9.2p1-2+deb12u3 gt 1:9.2p1-2+deb12u2 && echo newer
dpkg --compare-versions 1:9.2p1-2+deb12u3 gt 9.8p1 && echo "also newer, because of the epoch"
Both lines print. Comparing a Debian version with an upstream version number tells you nothing.
Example: regreSSHion on Debian and Ubuntu
| Fixed version | |
|---|---|
| Upstream OpenSSH | 9.8p1 |
| Debian 11 | not affected (the bug came in with 8.5p1) |
| Debian 12 | 1:9.2p1-2+deb12u3 (DSA-5724-1) |
| Ubuntu 22.04 | 1:8.9p1-3ubuntu0.10 (USN-6859-1) |
| Ubuntu 24.04 | 1:9.6p1-3ubuntu13.3 (USN-6859-1) |
| RHEL 9 | openssh-8.7p1-38.el9_4.1 |
A scanner that compares "9.2p1" with "fixed in 9.8p1" reports Debian 12 as vulnerable. That is a false positive. Scanners that read the distribution data (Trivy, Grype and others for OS packages) use the Debian fixed version instead and get it right.
How to check whether a CVE is fixed on your server
1. Ask the security tracker of your distribution. It lists the fixed version per release:
- Debian:
https://security-tracker.debian.org/tracker/CVE-2024-6387 - Ubuntu:
https://ubuntu.com/security/CVE-2024-6387 - Red Hat:
https://access.redhat.com/security/cve/CVE-2024-6387 - Alpine:
https://security.alpinelinux.org/vuln/CVE-2024-6387
2. Compare with the installed version.
# Debian, Ubuntu
dpkg-query -W -f='${Package} ${Version}\n' openssh-server
# RHEL, Rocky, Alma
rpm -q openssh-server
# Alpine
apk list --installed openssh-server
If the installed version is equal to or newer than the fixed version, the CVE is fixed in the package.
3. Optionally read the changelog. Do not rely on it alone. The Debian changelog entry for the regreSSHion fix does not name the CVE, because it was written before the disclosure:
apt-get changelog openssh-server | sed -n '/deb12u3)/,/^ --/p'
openssh (1:9.2p1-2+deb12u3) bookworm-security; urgency=high
* Non-maintainer upload by the Security Team.
* Disable async-signal-unsafe code from the sshsigdie() function
-- Salvatore Bonaccorso <carnil@debian.org> Sat, 22 Jun 2024 21:38:08 +0200
The sed range prints the whole entry, up to the signature line. The entry is dated 2024-06-22, nine days
before the disclosure, and the full changelog of Debian 12 (up to 1:9.2p1-2+deb12u10) does not name
CVE-2024-6387 anywhere.
On RHEL-family systems, rpm -q --changelog <package> | grep CVE- works for recent fixes, but the changelog in the package is trimmed: on Rocky Linux 9.9 the glibc changelog starts in October 2024. Use dnf updateinfo list --security to see the security advisories that are still to install.
4. Make sure the fixed code is running. A new library or kernel only protects you after a restart. A fixed OpenSSH needs systemctl restart ssh (Debian, Ubuntu) or systemctl restart sshd (RHEL family). A fixed kernel needs a reboot; compare uname -r with the newest installed kernel.
Where false positives come from
- Upstream version matching. Tools that match against NVD product names and upstream versions do not know about backports. Prefer scanners that use distribution data for OS packages.
- Vendored copies. A static binary or a container image can carry its own copy of a library. The distribution fix does not reach it, and a scanner that only reads the package database does not see it. That is a false negative, not a false positive.
- "Affected" without a fix. Many findings on a current distribution are CVEs that the distribution rates as minor and has not fixed. The guide on unfixed vulnerabilities covers them.
- Source and binary package names. Trackers list source packages (
openssh,glibc), your system has binary packages (openssh-server,libc6). A fix in the source package covers all binary packages built from it.
Sources
- Debian Policy: version numbering
- Debian security tracker: CVE-2024-6387 and CVE-2023-4911
- Ubuntu USN-6859-1
- CVE-2024-6387 record (affected 8.5p1 to 9.7p1, RHEL 9 fixed version) and the OpenSSH 9.8 release notes
- Debian changelog of openssh 1:9.2p1-2+deb12u10, the file
apt-get changelogreads (the deb12u3 entry, no mention of CVE-2024-6387) - Commands tested in
debian:bookworm-20261027-slimandrockylinux/rockylinux:9.9.20261112.0containers on 2026-11-26 (dpkg --compare-versions,apt-get changelog,rpm -q --changelog,dnf updateinfo)
Check your servers every day
The agent of Patchbrief reports the packages and settings of a server once a day; the digest names what to fix first.