dnf security update policy and version locking: patching by advisory with updateinfo, pinning with versionlock
What you will learn
Section titled “What you will learn”Two high-frequency operations tasks: patching only security fixes (updateinfo’s advisory-driven upgrades) and freezing a package’s version (versionlock). Every command was measured in an Oracle Linux 10.2 container.
updateinfo: Oracle’s security advisories, directly queryable
Section titled “updateinfo: Oracle’s security advisories, directly queryable”Oracle’s security advisories are called ELSA (Oracle Linux Security Advisory). No subscription, no login — dnf’s updateinfo subcommand consumes the advisory metadata shipped in the repositories:
{/* claim: EX-HUB-63 */}dnf updateinfo list available | head{/* claim: EX-HUB-64 */}ELSA-2026-84753 Moderate/Sec. glibc-2.39-145.0.1.el10_2.aarch64ELSA-2026-84753 Moderate/Sec. glibc-common-2.39-145.0.1.el10_2.aarch64ELSA-2026-93461 Important/Sec. libblkid-2.40.2-18.0.1.el10_2.aarch64ELSA-2026-93461 Important/Sec. libfdisk-2.40.2-18.0.1.el10_2.aarch64Each line = advisory id + severity + package version. For the overview:
{/* claim: EX-HUB-65 */}dnf updateinfo summaryUpdates Information Summary: available 2 Security notice(s) 1 Important Security notice(s) 1 Moderate Security notice(s)Three granularities of advisory-driven upgrade:
dnf update --security # every update carrying a security flagdnf update --security --severity=Important # Important and above onlydnf update --advisory=ELSA-2026-93461 # just this one advisoryversionlock: pin a package at a chosen version
Section titled “versionlock: pin a package at a chosen version”The standard tool for change-freeze windows (audit season, a big sale weekend, a kernel canary). Install the plugin first:
dnf install -y python3-dnf-plugin-versionlockTwo ways to lock — pin the current version, or hand-write a wildcard:
# Option 1: lock the currently installed versiondnf versionlock add curl
# Option 2: hand-write a wildcard (patch numbers may float, major version pinned)echo "curl-0:8.14.1-1.0.1.el10_2.*" > /etc/dnf/plugins/versionlock.list
dnf versionlock list# curl-0:8.14.1-1.0.1.el10_2.*Once locked, any transaction that would upgrade the package skips it. To unlock:
dnf versionlock delete curl-0:8.14.1-1.0.1.el10_2.*# or empty the config fileRelation to other scopes
Section titled “Relation to other scopes”- The complete ELSA system (OVAL data, the ELSA↔CVE mapping) is on the ELSA advisory page;
- Kernel version pinning (UEK and RHCK) has its own retention policy — see the UEK upgrade and multi-kernel page;
- Transaction-level rollback (you upgraded and want to go back) uses dnf history undo — see the dnf transaction rollback page;
- Cross-distro view: pkgseek.com/security lets you look up fix versions and severity by CVE number (aggregating OSV/NVD), complementing updateinfo’s per-advisory view — useful for “has this CVE been fixed in other distros” questions.
Evidence and limits on this page
Section titled “Evidence and limits on this page”- Measured: updateinfo list/summary, the versionlock plugin install, lock entries written and read back (E2 container, aarch64 variant);
- Not measured: a full
dnf update --securityupgrade transaction (the container package set is minimal; production upgrades should be validated on a staging VM first); - Sources:
dnf(8)/dnf-versionlock(8), the Oracle Linux security advisory system.