Managing and monitoring security updates
Update RHEL 9 system security to prevent attackers from exploiting known flaws
Abstract
Providing feedback on Red Hat documentation Copy linkLink copied to clipboard!
We appreciate your feedback on our documentation. Let us know how we can improve it.
Submitting feedback through Jira (account required)
- Log in to the Jira website.
- Click Create in the top navigation bar
- Enter a descriptive title in the Summary field.
- Enter your suggestion for improvement in the Description field. Include links to the relevant parts of the documentation.
- Click Create at the bottom of the dialogue.
Chapter 1. Identifying security updates Copy linkLink copied to clipboard!
Keeping enterprise systems secure from current and future threats requires regular security updates. Red Hat Product Security provides the guidance you need to confidently deploy and maintain enterprise solutions.
1.1. What are security advisories? Copy linkLink copied to clipboard!
Red Hat Security Advisories (RHSA) document the information about security flaws being fixed in Red Hat products and services.
Each RHSA includes the following information:
- Severity
- Type and status
- Affected products
- Summary of fixed issues
- Links to the tickets about the problem. Note that not all tickets are public.
- Common Vulnerabilities and Exposures (CVE) numbers and links with additional details, such as attack complexity.
Red Hat Customer Portal provides a list of Red Hat Security Advisories published by Red Hat. You can display details of a specific advisory by navigating to the advisory’s ID from the list of Red Hat Security Advisories.
Figure 1.1. List of security advisories
Optionally, you can also filter the results by specific product, variant, version, and architecture. For example, to display only advisories for Red Hat Enterprise Linux 9, you can set the following filters:
- Product: Red Hat Enterprise Linux
- Variant: All Variants
- Version: 9
- Optionally, select a minor version.
1.2. Displaying security updates that are not installed on a host Copy linkLink copied to clipboard!
You can list all available security updates for your system by using the dnf
utility.
Prerequisites
- A Red Hat subscription is attached to the host.
Procedure
List all available security updates which have not been installed on the host:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
1.3. Displaying security updates that are installed on a host Copy linkLink copied to clipboard!
You can list installed security updates for your system by using the dnf
utility.
Procedure
List all security updates which are installed on the host:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If multiple updates of a single package are installed,
dnf
lists all advisories for the package. In the previous example, two security updates for thepython3-libs
package have been installed since the system installation.
1.4. Displaying a specific advisory by using {PackageManager} Copy linkLink copied to clipboard!
You can use the dnf
utility to display a specific advisory information that is available for an update.
Prerequisites
- A Red Hat subscription is attached to the host.
- You know the ID of the security advisory.
- The update provided by the advisory is not installed.
Procedure
Display a specific advisory, for example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 2. Installing security updates Copy linkLink copied to clipboard!
In RHEL, you can install a specific security advisory and all available security updates. You can also configure the system to download and install security updates automatically.
2.1. Installing all available security updates Copy linkLink copied to clipboard!
To keep the security of your system up to date, you can install all currently available security updates using the dnf
utility.
Prerequisites
- A Red Hat subscription is attached to the host.
Procedure
Install security updates using
dnf
utility:dnf update --security
# dnf update --security
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Without the
--security
parameter,dnf update
installs all updates, including bug fixes and enhancements.Confirm and start the installation by pressing y:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: List processes that require a manual restart of the system after installing the updated packages:
dnf needs-restarting
# dnf needs-restarting 1107 : /usr/sbin/rsyslogd -n 1199 : -bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The previous command lists only processes that require a restart, and not services. That is, you cannot restart processes listed using the
systemctl
utility. For example, thebash
process in the output is terminated when the user that owns this process logs out.
2.2. Installing a security update provided by a specific advisory Copy linkLink copied to clipboard!
In certain situations, you might want to install only specific updates. For example, if a specific service can be updated without scheduling a downtime, you can install security updates for only this service, and install the remaining security updates later.
Prerequisites
- A Red Hat subscription is attached to the host.
You know the ID of the security advisory that you want to update.
For more information, see the Identifying the security advisory updates section.
Procedure
Install a specific advisory, for example:
dnf update --advisory=RHSA-2019:0997
# dnf update --advisory=RHSA-2019:0997
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Alternatively, update to apply a specific advisory with a minimal version change by using the
dnf upgrade-minimal
command, for example:dnf upgrade-minimal --advisory=RHSA-2019:0997
# dnf upgrade-minimal --advisory=RHSA-2019:0997
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm and start the installation by pressing
y
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: List the processes that require a manual restart of the system after installing the updated packages:
dnf needs-restarting
# dnf needs-restarting 1107 : /usr/sbin/rsyslogd -n 1199 : -bash
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The previous command lists only processes that require a restart, and not services. This means that you cannot restart all processes listed by using the
systemctl
utility. For example, thebash
process in the output is terminated when the user that owns this process logs out.
2.3. Installing security updates automatically Copy linkLink copied to clipboard!
You can configure your system so that it automatically downloads and installs all security updates.
Prerequisites
- A Red Hat subscription is attached to the host.
-
The
dnf-automatic
package is installed.
Procedure
In the
/etc/dnf/automatic.conf
file, in the[commands]
section, make sure theupgrade_type
option is set to eitherdefault
orsecurity
:[commands] # What kind of upgrade to perform: # default = all available upgrades # security = only the security upgrades upgrade_type = security
[commands] # What kind of upgrade to perform: # default = all available upgrades # security = only the security upgrades upgrade_type = security
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enable and start the
systemd
timer unit:systemctl enable --now dnf-automatic-install.timer
# systemctl enable --now dnf-automatic-install.timer
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the timer is enabled:
systemctl status dnf-automatic-install.timer
# systemctl status dnf-automatic-install.timer
Copy to Clipboard Copied! Toggle word wrap Toggle overflow