Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2039989

Summary: Cockpit not able to install latest live kernel patch
Product: Red Hat Enterprise Linux 8 Reporter: Brian Smith <briasmit>
Component: cockpit-appstreamAssignee: Martin Pitt <mpitt>
Status: CLOSED ERRATA QA Contact: Jan Ščotka <jscotka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.5CC: bhu, joe.lawrence, jvanderwaa, mmarusak, mpitt
Target Milestone: rcKeywords: Triaged
Target Release: 8.7Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cockpit-appstream-269-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 09:38:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Brian Smith 2022-01-12 21:26:47 UTC
Description of problem:
If live kernel patching is enabled from Cockpit on a RHEL 8.5 system, the latest live kernel patch is installed.  At a later date when Red Hat releases a new live kernel patch, it is currently not possible from Cockpit to install the new kpatch without updating all other software (which would require the system to be rebooted). 


Version-Release number of selected component (if applicable):
RHEL 8.5


How reproducible:
Every time

Steps to Reproduce:
1.  Enable live kernel patching in Cockpit (latest kpatch is installed)
2.  Wait for new kpatch to be released

Actual results:
I'm unable to install the newly released kpatch without installing all other updates, which would require a reboot.

Expected results:
I should be able to install the newly released kpatch from Cockpit, without updating all other software on the system which would require a reboot.

Additional info:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/applying-patches-with-kernel-live-patching_managing-monitoring-and-updating-the-kernel#updating-kernel-patch-modules_applying-patches-with-kernel-live-patching

Comment 2 Jelle van der Waa 2022-03-25 15:57:37 UTC
We could add a new button in cockpit to install kpatches, but as kpatches are likely security updates shouldn't it be part of "Install security updates". This already provides a way to not reboot the system using tracer to restart the affected services which should be restarted.

The benefit of this approach is that we don't have to add another button for installing kpatches, is my assumption correct that kpatches are usually security updates and could be combined? It feels weird to only apply kpatches and not normal userland security updates.

Comment 3 Brian Smith 2022-03-25 16:19:06 UTC
We can't currently support this very important use case in Cockpit:  

- I previously installed a kpatch
- Some amount of time has passed, and now there is a new kpatch update and many other security updates available
- I would like to install the latest kpatch, however I am not in a maintenance window to be able to restart other services/processes (which would be required if I installed all other security updates)

The kernel live patching documentation [1] describes exactly this as the intended use case:  "You can use the Red Hat Enterprise Linux kernel live patching solution to patch a running kernel without rebooting or restarting any processes.", and also you "Do not have to wait for long-running tasks to complete, for users to log off, or for scheduled downtime."

[1] https://access.redhat.com/documentation/de-de/red_hat_enterprise_linux/8/html-single/managing_monitoring_and_updating_the_kernel/index#applying-patches-with-kernel-live-patching_managing-monitoring-and-updating-the-kernel

Comment 4 Martin Pitt 2022-03-25 17:15:44 UTC
The *technical* difference is quite clear. Implementing a new "install kpatches only" button is easy.

My concern is the user story. I'd like to make sure that this is really what we want to convey -- it is a sanctioned thing to only install kpatches, and disregarding pending userspace security updates. ISTM that this is somewhat weird: Either your machine is exposed and you do have to care about applying security updates ASAP (and restarting services), or it doesn't matter for you infra (maybe because it's not on the public internet, or does not have incoming requests, etc.) - but then neither is very urgent.

So this smells a bit like a gambling approach: "I don't want to reboot and hope that I can ignore one half of the security fixes". The technical constraints are clear as well -- we can guarantee that kpatches don't require service restarts or reboots, whereas we don't know in advance for userland updates. So I am mostly interested about the background of this idea/request.

FTR, I can live with just adding the button, but I have a feeling that it might be tempting to weaken security in some cases.

Comment 5 Brian Smith 2022-03-25 18:59:52 UTC
Just as an example:  Suppose my organization has a maintenance/downtime window to install patches on something like a monthly basis.   We are two weeks away from the next maintenance/downtime window, and a critical kernel vulnerability is announced with a kernel live patch available.  Due to my maintenance window, I need to wait 2 weeks to install any disruptive updates that require restarting services, but with kernel live patching I could immediately install the kpatch and not be vulnerable for this critical kernel issue.  In two weeks, I'll go ahead and patch everything and reboot during the maintenance window.  But for the next two weeks until my maintenance window I want to be protected against this critical kernel security issue.  

Another point I want to bring up:  we offer very different experiences based on if you've previously enabled kpatch in Cockpit or not.  If you have never enabled kpatch in Cockpit, at any time you can enable kpatch and *only* get the latest kpatch installed with no other patches.  If you have previously enabled kpatch in Cockpit you no longer have the option to install just the latest kpatch without installing all other security updates.  Why would we have such different experiences in these two scenarios?  

Again, I want to point out that the documentation for kernel live patching states "You can use the Red Hat Enterprise Linux kernel live patching solution to patch a running kernel without rebooting or restarting any processes.".  The documentation shows how to only install the latest kernel update from the command line, without updating any other packages on the system [1].  

If we are going to offer kernel live patching in Cockpit, it is essential that we offer the ability to install a kpatch without installing all available security updates on the system (which in many cases will require several processes to need to be restarted).  

[1] - https://access.redhat.com/documentation/de-de/red_hat_enterprise_linux/8/html-single/managing_monitoring_and_updating_the_kernel/index#updating-kernel-patch-modules_applying-patches-with-kernel-live-patching

Comment 6 Jelle van der Waa 2022-05-05 09:48:40 UTC
The latest Cockpit release has implemented adding a "install kpatches only" button https://cockpit-project.org/blog/cockpit-268.html

Comment 15 Martin Pitt 2022-06-08 04:32:36 UTC
Beth, the fix is already in 9.1.

Comment 17 errata-xmlrpc 2022-11-08 09:38:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (cockpit-appstream bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7554