GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Kernel version is only checked at its start, then run through eval · Issue #63 · tmiland/kernel-installer

Kernel version is only checked at its start, then run through eval #63

New issue
Copy link
New issue
Copy link
Closed
#73
Closed
Kernel version is only checked at its start, then run through eval#63
#73
Copy link

Description

@davmonk
davmonk
opened on Nov 10, 2026
Issue body actions

Problem

The kernel version is only checked at its start, and is later run through eval:

  • chk_version (kernel_installer.sh:437) uses ^[0-9]+\.[0-9]+ with no end anchor, so anything that starts with digits.digits passes. -k (:745) only checks the first character.
  • run_ok runs its command string with eval (src/slib.sh:344), and the version is pasted into those strings: run_ok "wget -c $kernel_url" (:1432) and run_ok "tar xf linux-${LINUX_VER}.tar.$file_ext" (:1442).
  • With --mainline, the version comes from https://www.kernel.org/finger_banner (:84, :93) and reaches that eval before anything is downloaded or checked.

Impact

A malformed version string becomes shell code run as root. On the default stable/longterm path, signature checking fails first for a bad version, so the tar line is not reached (traced in the code, not run). The exposure is mainly --mainline and runs with GET_VERIFIED_TARBALL=0. The banner is fetched over HTTPS, so this needs a tampered response. Still, version data should not be able to run as a command.

Suggested fix

  • Validate the whole string, e.g. ^[0-9]+\.[0-9]+(\.[0-9]+)?(-rc[0-9]+)?$. Apply it to -k, to the versions read from the banner, and to LINUX_VER / MAINLINE_VER from the environment.
  • Longer term: call run_ok with a function or quoted arguments instead of a string for eval.

How this was checked

On Linux Mint 22.3 (bash 5.2), main 8cbf9f2:

  • The chk_version pattern accepts 6.17.7;junk and 6.17x y.
  • With src/slib.sh sourced, run_ok "echo linux-${v}.tar.xz" and v='6.17.7;echo MARKER' wrote two lines to the log, linux-6.17.7 and MARKER.tar.xz, so the ; split the command. The control run (v=6.17.7) wrote a single line linux-6.17.7.tar.xz.
  • Not tested: a full installer run with a tampered banner.

Activity

  1. tmiland
    added a commit that references this issue on Nov 10, 2026

    fix: validate kernel versions and harden the build directory (#63, #62,

    3810bd7
  2. tmiland
    closed this as completedin #73on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.