To find out if a patch number, also known as a Common Vulnerabilities and Exposures (CVE) number, has been applied to a Red Hat Enterprise Linux (RHEL) or CentOS Linux system, you can use the yum
command. This command is used to manage software packages on the system, including installing, updating, and removing packages.
To check if a specific patch has been applied to the system, you can use the yum history
command with the info
subcommand and the ID of the patch. The patch ID is the CVE number preceded by "CVE-".
For example, to check if patch CVE-2020-12345 has been applied to the system, you can use the following command:
yum history info CVE-2020-12345
This will output information about the patch, including the transaction ID, the package name, the date and time the patch was installed, and the user who installed the patch. If the patch has not been applied to the system, the command will output an error message.
Alternatively, you can use the yum history
command with the list
subcommand to list all patches applied to the system, and then use the grep
command to filter the output for the patch you are interested in.
For example:
yum history list | grep CVE-2020-12345
This will output a line for the patch if it has been applied to the system, or no output if the patch has not been applied.