Skip to content

common: follow the HWE kernel line so a reboot lands on a fixed kernel - #43

Open
TakGN wants to merge 1 commit into
mainfrom
common-kernel-hwe-7-0
Open

TakGN wants to merge 1 commit into
mainfrom
common-kernel-hwe-7-0

Conversation

@TakGN

@TakGN TakGN commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Comes out of a read-only security review of the boxes (2026-11-16).

Why

sing-1, lith-1 and chic-1 run kernel 6.17.0-23-generic (built 2026-04-14), from Ubuntu's linux-hwe-6.17. Ubuntu marks that line end of life and will not fix it; CVE-2026-98432 is listed there as "Ignored: end of life, was needed" (ubuntu.com/security/CVE-2026-98432, last updated 2026-11-14). The nft filter keeps that one CVE out, but no other kernel fix since April is on the boxes either.

A reboot does not help today. Read on all three on 2026-11-16 (dpkg -l, /etc/default/grub):

  • Cherry's image installed linux-generic-6.17, a meta-package that only ever follows 6.17. It has since pulled in 6.17.0-42, also unfixed.
  • linux-generic (6.8 GA, fixed in 6.8.0-149) is installed too, but GRUB boots the highest installed version (GRUB_DEFAULT=0), so a reboot lands on 6.17.0-42.
  • linux-generic-hwe-24.04, the meta-package that follows the HWE line, is not installed. Its candidate is 7.0.0-43.43~24.04.1, fixed for CVE-2026-98432 per Ubuntu's tracker.

Change

  • roles/common/defaults/main.yml: common_kernel_packages (Ubuntu: linux-generic-hwe-24.04) and common_kernel_packages_absent (Ubuntu: linux-generic-6.17), with the reasoning.
  • roles/common/tasks/main.yml: install the first, remove the second (meta-package only, no autoremove, no purge), right after the base packages. Debian (the indexers) has neither key, so both tasks skip there.
  • README.md: "Which kernel the IPFS boxes boot" under "Package updates and reboots", and a line in the CVE-2026-98432 section saying which kernel is the fixed one.

Why HWE 7.0 and not back to 6.8 GA: the boxes have been on the HWE kernels, 7.0 is the last HWE line 24.04 gets (26.04's kernel), so it won't roll again, and it is published in noble-security, so unattended-upgrades keeps it patched. 6.8 GA would also be fixed and is the more conservative choice; it would mean removing the 6.17 images instead, including the running one. Say if you prefer it.

What the first run does

From apt-get -s install linux-generic-hwe-24.04 on sing-1 (simulation, nothing installed): installs linux-image-7.0.0-43-generic with its modules, headers and tools, and libllvm19; all from noble-security. apt-get -s remove linux-generic-6.17 removes only that meta-package. / has 822G free.

No reboot. The new kernel waits, like every kernel here. The 6.17 kernels stay installed as a fallback in GRUB's Advanced options (linux-image-6.17.0-23-generic is marked manual, so autoremove won't take it either).

Checked

  • ansible-playbook --syntax-check site.yml and platform.yml pass.
  • yamllint and ansible-lint were not run locally; CI runs them, and the merge gets CI's dry run on the summary page before the approval.

Not checked: a real site.yml run; booting 7.0 on this hardware (Intel E810, Micron 7450/7500 NVMe, all with in-tree drivers).

After merging

  1. CI's site.yml run (after approval) installs the kernel on all three, one box at a time. Then ls -1 /boot/vmlinuz-* | sort -V | tail -1 should show 7.0.0-43 or later.
  2. Reboot one box at a time, only once needle is warm on the other two (README). Check uname -r, the pods, and the box's endpoints.
  3. Leave the CVE-2026-98432 filter on until every box in a group runs a fixed kernel, then set cve_2026_98432_mode: off for that group. This PR covers only the IPFS boxes. indexers-chic1 already runs a fixed Debian kernel (6.12.115; Debian fixed it in 6.12.113), and sf and sf2 run 6.1.190, which is fixed too.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread README.md
Comment on lines +354 to +355
Removing the meta-package removes no kernel: the old ones stay installed as a
fallback in GRUB's "Advanced options" until someone purges them. Check what a

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit (verify before relying on it): "the old ones stay installed ... until someone purges them" is not guaranteed on these boxes. roles/common/tasks/main.yml:264-265 sets Unattended-Upgrade::Remove-Unused-Kernel-Packages "true" and Remove-Unused-Dependencies "true". Once linux-generic-6.17 is gone, any 6.17 kernel that was pulled in as an automatic dependency (the PR says 6.17.0-42 was) is auto-removable, and unattended-upgrades can purge it on its next run, as long as it is not the running kernel. Only kernels marked manual, such as 6.17.0-23, are safe. The fallback in GRUB therefore probably ends up as just 6.17.0-23 (the April build). That is still a bootable fallback, but the text should say so, or the settings should be changed if you want to keep more than one kernel. Check apt-mark showmanual | grep linux-image on a box, and apt-get -s autoremove, to see which ones are exposed.

@claude

claude Bot commented Nov 17, 2026

Copy link
Copy Markdown

Claude review

The change is small and sound: it installs linux-generic-hwe-24.04 and removes only the linux-generic-6.17 meta-package. It skips cleanly on Debian, does not reboot, and keeps autoremove and purge off. I found nothing that would break a run or take a box down. The one point is a documentation inaccuracy about the fallback kernels. I did not run the playbook or check what the boxes have installed; this is from reading the diff and the role.

Findings

  1. Nit — README.md:354-355: the README says the old 6.17 kernels stay installed until someone purges them. roles/common/tasks/main.yml:264-265 enables Remove-Unused-Kernel-Packages and Remove-Unused-Dependencies, so unattended-upgrades can purge any auto-installed 6.17 kernel (e.g. 6.17.0-42) once the meta-package is gone. Manually marked kernels such as 6.17.0-23 should survive. The GRUB fallback is then likely just 6.17.0-23. Either reword or change those settings.

claude-sonnet-5-5 at high effort · requested by TakGN · re-run with @claude review [sonnet|opus|fable] [low|medium|high|xhigh|max]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant