Repository navigation
docs: add docs for CVE-aware reboot recommendations feature #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,3 +167,5 @@ xml | |
| yaml | ||
| YouTube | ||
| yq | ||
| Severities | ||
| Livepatches | ||
65 changes: 65 additions & 0 deletions
65
docs/client/explanation/architecture/how-kernel-upgrade-recommendations-work.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| myst: | ||
| html_meta: | ||
| description: "Understand how the Livepatch Client decides whether a reboot into a newer kernel is urgent, and why it sometimes makes no recommendation." | ||
| --- | ||
|
|
||
|
|
||
| (client-explanation-how-kernel-upgrade-recommendations-work)= | ||
|
|
||
| # How kernel upgrade recommendations work | ||
|
|
||
| When a new kernel is installed, Ubuntu asks for a reboot. This page explains how Livepatch decides whether that reboot is urgent, and why it sometimes makes no recommendation. | ||
|
|
||
| ## Why the recommendation exists | ||
|
|
||
| Live kernel patches cover high and critical kernel vulnerabilities. A newer kernel can include many fixes, but if Livepatch already covers those fixes, the machine isn't exposed while it waits for the next maintenance window. Lower-priority fixes are only available by rebooting into the new kernel. | ||
|
|
||
| The kernel upgrade recommendation helps you tell these situations apart. It answers a single question: does the kernel that will boot next fix CVEs that this machine isn't already protected from? | ||
|
|
||
| ## Where the information comes from | ||
|
|
||
| When the Livepatch Server is enabled with the CVE service, it knows which CVEs each Ubuntu kernel version fixes. | ||
|
|
||
| On every check-in, the client tells the server: | ||
|
|
||
| * The kernel that's running. | ||
| * The kernel that will boot after a reboot. | ||
| * The CVEs fixed by the live patches that are currently applied. | ||
|
|
||
| The server replies with the CVEs that the next boot kernel fixes and that the running kernel doesn't. | ||
|
|
||
| ## How the client recommends reboots | ||
|
|
||
| The client takes the CVEs that the next boot kernel adds and removes the ones that the applied live patches already cover. For example: | ||
|
|
||
| * The next boot kernel fixes 5 CVEs that the running kernel doesn't. | ||
| * The applied live patches already cover 3 of them. | ||
| * The 2 that remain aren't covered, so the client recommends a reboot. | ||
|
|
||
| If the applied Livepatch covers all the CVEs fixed by the next boot kernel, the Livepatch Client removes the pending reboot notice, and the reboot can wait for a maintenance window. | ||
|
|
||
| ## The newest kernel hint | ||
|
|
||
| If Canonical has published an even newer kernel in the same series and flavour as the next boot kernel, the client mentions it, together with the CVEs it fixes. This is informational. It never changes the recommendation or whether a reboot notice is removed. | ||
|
|
||
| ## Why the client sometimes stays quiet | ||
|
|
||
| The client only makes a recommendation when it has complete evidence. If anything is uncertain, it makes no recommendation rather than guessing, and it keeps any pending reboot notice. This happens in the following cases: | ||
|
|
||
| * The Livepatch Server doesn't provide kernel upgrade information. | ||
| * The kernel that will boot next can't be determined with confidence. | ||
| * The kernel is a custom or unsigned kernel that doesn't match an installed Ubuntu kernel package. | ||
|
|
||
| For the full list, see the [kernel upgrade recommendation reference](/client/reference/platform/kernel-upgrade-recommendation.md). | ||
|
|
||
| ## Requirements | ||
|
|
||
| * Livepatch Client v11.1.0 or later. | ||
| * For on-prem deployments, Livepatch Server v2.7.0 and CVE service v1.1.0 or later, with CVE lookup and CVE sync enabled. See [how to deploy the CVE service via snap](/server/how-to-guides/deployment/deploy-cve-service-via-snap.md). | ||
|
|
||
| ## See also | ||
|
|
||
| * [How reboot notices are removed after a kernel update](/client/explanation/architecture/reboot-marker-suppression.md) | ||
| * [Kernel upgrade recommendation reference](/client/reference/platform/kernel-upgrade-recommendation.md) | ||
| * [Configure the reboot notification policy](/client/how-to-guides/configuration/configure-reboot-notification-policy.md) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
docs/client/explanation/architecture/reboot-marker-suppression.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| myst: | ||
| html_meta: | ||
| description: "Understand when the Livepatch Client removes the pending reboot notice after a kernel update, and when it keeps it." | ||
| --- | ||
|
|
||
|
|
||
| (client-explanation-how-reboot-notices-are-removed)= | ||
|
|
||
| # How reboot notices are removed after a kernel update | ||
|
|
||
| With the `livepatch-aware` reboot notification policy, the Livepatch Client can remove the system's pending reboot notice after a kernel install when Livepatch already covers the CVEs fixed by the next boot kernel. This page explains when that happens and when it doesn't. | ||
|
|
||
| To configure the policy, see [how to configure the reboot notification policy](/client/how-to-guides/configuration/configure-reboot-notification-policy.md). | ||
|
|
||
| ## What Livepatch does | ||
|
|
||
| After a kernel install, the system shows a pending reboot notice. With the `livepatch-aware` policy, the client checks whether that reboot is needed urgently. After `apt` finishes installing a kernel, a post-invoke hook created by the Livepatch Client refreshes client information and checks the [kernel upgrade recommendation](/client/explanation/architecture/how-kernel-upgrade-recommendations-work.md). It removes the pending reboot notice only when the result proves that Livepatch covers the CVEs fixed by the next boot kernel. The reboot can then wait for a maintenance window, and the Livepatch message shows that the system is protected. | ||
|
|
||
| This only applies to the `livepatch-aware` policy. | ||
|
|
||
| ## When the notice stays | ||
|
|
||
| The client keeps the reboot notice in the following cases: | ||
|
|
||
| * Packages other than the kernel also need the restart. | ||
| * The refresh or the coverage check fails or times out. | ||
| * The evidence is incomplete. See [when there is no recommendation](/client/reference/platform/kernel-upgrade-recommendation.md) for the cases. | ||
| * The policy is `livepatch-agnostic`. | ||
|
|
||
| ## Effects on other tools | ||
|
|
||
| Removing the reboot notice, i.e. the `/var/run/reboot-required` file, also removes it for other tools that read it. For example: | ||
|
|
||
| * `unattended-upgrades` with `Automatic-Reboot` enabled doesn't restart the machine, because it only reboots when a notice is pending. | ||
| * `update-notifier` and the message of the day no longer show the system's "System restart required" message. | ||
| * Monitoring and fleet management tools that check for the reboot notice no longer report the machine as needing a reboot. | ||
|
|
||
| If you don't want Livepatch to change the system's reboot notice, set the policy to `livepatch-agnostic`. See [how to disable Livepatch-aware reboot notifications](/client/how-to-guides/configuration/configure-reboot-notification-policy.md#disable-livepatch-aware-reboot-notifications). | ||
|
|
||
| ## Limits | ||
|
|
||
| * Only kernels installed or upgraded with `apt` are evaluated. A kernel installed with `dpkg -i` isn't evaluated until the next `apt` run. | ||
| * If you change the GRUB default or the boot entry later, the notice isn't evaluated again until the next scheduled or manual refresh. The message of the day never shows a recommendation that's out of date. | ||
| * On s390x, the client never removes the notice, because the architecture doesn't use GRUB. | ||
|
|
||
| ## Outcomes at a glance | ||
|
|
||
| | Situation after a kernel install | Reboot notice | Livepatch message | | ||
| | --- | --- | --- | | ||
| | Livepatch covers the next boot kernel's CVEs | Removed | Protected | | ||
| | Livepatch doesn't cover all of the next boot kernel's CVEs | Kept | Reboot required | | ||
| | Other packages also need the restart | Kept | None, the system's own notice is shown | | ||
| | The client can't prove coverage | Kept | None, the system's own notice is shown | | ||
|
|
||
| ## See also | ||
|
|
||
| * [How kernel upgrade recommendations work](/client/explanation/architecture/how-kernel-upgrade-recommendations-work.md) | ||
| * [Kernel upgrade recommendation reference](/client/reference/platform/kernel-upgrade-recommendation.md) | ||
| * [Configure the reboot notification policy](/client/how-to-guides/configuration/configure-reboot-notification-policy.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
docs/client/how-to-guides/configuration/configure-reboot-notification-policy.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| --- | ||
| myst: | ||
| html_meta: | ||
| description: "How to configure the reboot notification policy of the Livepatch Client, so that reboot notices account for kernel CVEs already covered by Livepatch." | ||
| --- | ||
|
|
||
|
|
||
| (client-how-to-guides-how-to-configure-the-reboot-notification-policy)= | ||
|
|
||
| # How to configure the reboot notification policy | ||
|
|
||
| By default, the Livepatch Client can remove a pending reboot notice after a kernel update when Livepatch already covers the CVEs that the next boot kernel fixes. This guide shows how to check, enable, and disable that behavior. | ||
|
|
||
| ## Requirements | ||
|
|
||
| * Livepatch Client v11.1.0 or later. | ||
| * For on-prem deployments, Livepatch Server v2.7.0 and CVE service v1.1.0 or later. | ||
|
PrinsonF77 marked this conversation as resolved.
|
||
|
|
||
| ## Check the reboot notification policy | ||
|
|
||
| To check the reboot notification policy, run the following command: | ||
|
|
||
| ```bash | ||
| sudo canonical-livepatch config reboot-notification-policy --format yaml | ||
| reboot-notification-policy: livepatch-aware | ||
|
|
||
| sudo canonical-livepatch config reboot-notification-policy --format json | ||
| {"reboot-notification-policy":"livepatch-aware"} | ||
| ``` | ||
|
|
||
| ## Enable Livepatch-aware reboot notifications | ||
|
|
||
| To make reboot notifications aware of the Livepatch state, which is the default, run the following command: | ||
|
|
||
| ```bash | ||
| sudo canonical-livepatch config reboot-notification-policy=livepatch-aware | ||
| ``` | ||
|
|
||
| With this policy, the client removes a pending reboot notice only after a refresh confirms that Livepatch covers the CVEs fixed by the next-boot kernel. If the refresh, the coverage check, or either command's timeout fails, the notice stays. | ||
|
|
||
| The snap connects the interfaces that this feature needs (`etc-kernel-postinst-d`, `etc-apt-conf-d`, and `boot-grub`) automatically. If the client does not remove notices as expected, check that all three interfaces are connected: | ||
|
|
||
| ```bash | ||
| snap connections canonical-livepatch | ||
| ``` | ||
|
|
||
| To connect a missing interface, run: | ||
|
|
||
| ```bash | ||
| sudo snap connect canonical-livepatch:<interface> | ||
| ``` | ||
|
|
||
| ## Disable Livepatch-aware reboot notifications | ||
|
|
||
| When the client removes a reboot notice, tools that read it, such as `unattended-upgrades` and `update-notifier`, are affected. If you don't want the client to remove reboot notices, make reboot notifications independent of the Livepatch state by running the following command: | ||
|
|
||
| ```bash | ||
| sudo canonical-livepatch config reboot-notification-policy=livepatch-agnostic | ||
| ``` | ||
|
|
||
| With this policy, the client never removes a pending reboot notice. | ||
|
|
||
| ## Next steps | ||
|
|
||
| * To learn how the client decides to remove a reboot notice, see [how reboot notices are removed after a kernel update](/client/explanation/architecture/reboot-marker-suppression.md). | ||
| * For all client settings, see the [configuration options](/client/reference/platform/configuration-options.md). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.