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 runs OpenSSH 9.2p1 and is not vulnerable: stable distributions copy the fix into the version they ship instead of moving to a new upstream release. Whether a CVE is fixed on your server depends on the package version of your distribution.
Why distributions backport
Updates to a stable release such as Debian 12, Ubuntu 24.04 or RHEL 9 are meant to leave behaviour alone. 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
The format is [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
The format is 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.
Comparing versions
Compare versions only with the tool of the distribution; 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
| Release | 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, a false positive. Trivy, Grype and other scanners that read the distribution data for OS packages use the Debian fixed version instead.
How to check whether a CVE is fixed on your server
1. Look up the fixed version
The security tracker of your distribution 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 it 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 package has the fix.
3. Read the changelog, if you like
Do not rely on the changelog 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 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- finds recent fixes, but the changelog in the package is trimmed: on Rocky Linux 9.9 the glibc changelog starts in October 2024. dnf updateinfo list --security lists the security advisories that are still to install.
4. Make sure the fixed code is running
A new library or kernel protects you only 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 scanner results go wrong
Tools that match against NVD product names and upstream versions do not know about backports. For OS packages, prefer scanners that use distribution data.
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 reads only the package database does not see it. That is a false negative.
Many findings on a current distribution are CVEs that the distribution rates as minor and has not fixed. Unfixed vulnerabilities covers them.
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 Vulnpocalypse collector reports the packages and settings of a server once a day, and the digest lists what to fix, most urgent first.
Vulnpocalypse