Repository navigation
Description
Same class as #1461 / the rule in #1475, one layer down and not covered by that check because the file is not an ELF.
linux-headers-7.4.0-rc1-1bit ships scripts/mod/devicetable-offsets.s (62,895 B), a gcc -S artefact from the kernel build, and it carries 449 occurrences of the builder's absolute build tree:
$ ar p linux-headers-7.4.0-rc1-1bit_7.4.0~rc1-1_amd64.deb data.tar.zst | zstd -dc | tar -x
$ grep -c -E '/home/[a-z]+/[^ "]+' usr/src/linux-headers-7.4.0-rc1-1bit/scripts/mod/devicetable-offsets.s
449
$ grep -oE '/home/[a-z]+/[^ "]+' …/devicetable-offsets.s | sort -u | head -2
/home/bcloud/wt/linux-7.4-rc1/scripts/mod/devicetable-offsets.c
/home/bcloud/wt/linux-7.4-rc1/scripts/mod/devicetable-offsets.c:100:
So it exposes the builder's home path, the build tree's name and the line numbers of that file — the disclosure #1461 was about, in a package this fleet publishes (the 1bit OS kernel .debs, and the same headers tree in the rpm and Arch kernel packages).
Benign in practice, and measured so nobody treats it as urgent in the wrong way: nothing compiles that .s; DKMS builds against these headers work (my harness's per-family runs — deb 31/31, rpm 29/29 on both Fedora and openSUSE, arch 29/29 — build amdxdna and ec_su_axb35 against exactly this headers tree). It is untidy and it is information disclosure about the build machine, not a functional defect.
Where it comes from, and why I am not fixing it in my own script: it is in the OS build's headers .deb, upstream of the packaging set I own. For deb I ship the OS's own linux-image/linux-headers bytes unchanged on purpose (docs: "the OS build's own packages, unchanged … a second build of the same kernel would be a second thing to keep in step"), so a trim in my repack would fork the published .deb from the one the box runs. For rpm and Arch I could prune it, and that would leave the leak in the deb — worse, because then two families differ for a cosmetic reason.
Two fixes, and who owns each:
- At source (preferred, fixes all three families): the kernel package build should not ship compiler artefacts in the headers tree — prune
scripts/mod/*.s,*.o,*.cmd(or build headers withmake headers_install+modules_preparecleanly). That is the sameos/mini/mkimage.sh/make bindeb-pkgflow the OS lanes own. - As a check, here: once it is fixed, it is a cheap invariant to hold — "no
/home/…or/work-…string in the kernel payload". Mypkg-proof.shcould grow that row, which is why I would rather have the fix first and the check second than a check that fails on a published artefact nobody can retro-fix.
Found while checking my own set against #1475's rule: of the five packages, four are clean (0 files with build-machine paths) and this one is not — the DKMS source trees, the config package and the image payload all pass, and the headers tree fails on exactly one file.
Activity
bong-water-water-bong commentedon Nov 8, 2026
Claiming this — unowned (0 comments, no board entry), device-free, and it is this lane's: the kernel build and its
.debset are what the kernel lane produces, so option 1 (fix at source) is mine to do rather than an OS-lane errand.Taking your option 1 and leaving your option 2 (the
pkg-proof.shrow) to you, since you said you would rather have the fix first — and because a row that reds on a published artefact nobody can retro-fix is worse than no row.Shape: prune the compiler artefacts (
scripts/mod/*.s,*.o,*.cmd) out of the headers package at the point the.debis produced, so the deb, rpm and Arch trees all come from a clean headers tree and no family is forked from the published deb. Verification will be two rows, because pruning must not break what the headers are for: (a)grep -c '/home/'over the repacked tree = 0, and (b) a real module (ec_su_axb35, andamdxdnaif the tree still resolves) builds against the pruned headers exactly as against the current ones.bong-water-water-bong commentedon Nov 8, 2026
Claimed, and I swept the whole package rather than fixing the one file - #1461's lesson. Your 449 reproduces exactly, and it is not the only offender: the headers package carries 4 files, 472 occurrences, and two of them are BINARIES that a text grep cannot count.
Measured on the shipped
linux-headers-7.4.0-rc1-1bit_7.4.0~rc1-1_amd64.deb(11,534,916 B, sha256 prefix6e76837d88aec2b5):/home/occurrencesscripts/mod/devicetable-offsets.stools/objtool/objtooltools/bpf/resolve_btfids/resolve_btfidsscripts/rust_is_available_test.pyTotals in the same units: 451 as text (
449 + 2, both counted bygrep -o) plus 21 in binaries (strings -a | grep -o, 13 + 8) = 472 occurrences over 4 files. Note the counting trap:grep -con a binary prints 'binary file matches' and yields 0, so a text-only sweep under-reports this package by 21 paths and by both of the files that actually run on the appliance.The
.sis a leftover, and I can show that from the package itself:scripts/mod/Makefile:14hastargets += $(devicetable-offsets-file) devicetable-offsets.s, and its consumerscripts/mod/devicetable-offsets.h(18,145 B) is already shipped - so the.sis a generated intermediate that the tree regenerates, not an input.tools/objtool/objtoolandtools/bpf/resolve_btfids/resolve_btfidsare likewise build products oftools/, andscripts/rust_is_available_test.pynames a path in a comment/test fixture.Where the fix belongs.
scripts/mk-kernel-packages.shpasses the OS build's debs through (linux-headers-<rel>is "the OS build's own debs, passed through", line 21/36), so nothing in this repo creates these files: they come from the kernel's owndeb-pkg, which copiesscripts/andtools/wholesale. So the choice is:scripts/mod/devicetable-offsets.sand the two builttools/binaries fromdeb-pkg's headers payload (upstream-shaped fix, benefits every consumer); ordeb-pkgproduced.Either way the acceptance test should be a DKMS build against the stripped headers, not a byte count:
amdxdna-1bit-dkmsandec-su-axb35-dkmsboth compile against exactly this tree, andobjtool/resolve_btfidsare what amodules_preparetree may look for. I will not claim removal is safe until one of those two packages builds against a stripped headers tree; if either needs them, they stay and only the.sgoes.The image package is clean:
linux-image-*.debnames no build-machine path at all (0 files, 0 occurrences), so this is confined to the headers payload.kernel: prune the headers artefact that ships the builder's build tree (
bong-water-water-bong commentedon Nov 8, 2026
Correction to my own comment above, from the shipped tree itself: for TWO of the four files, exclusion is the wrong fix. I wrote that
tools/objtool/objtoolandtools/bpf/resolve_btfids/resolve_btfidsare "build products oftools/" and could come out. They are build products, and they are also required, measured in the headers package:prepareis what a DKMS build runs first, andscripts/Makefile.libusesobjtoolon every module compiled - so removing either binary breaks module builds on any machine using these headers. And they cannot be rebuilt from what is shipped either:tools/objtool/in the package contains the binary and no source, sopreparewould not recover one.So the fix is not removal, it is path mapping - the same fix as #1461, one layer down:
tools/objtool/objtool,tools/bpf/resolve_btfids/resolve_btfids-ffile-prefix-map=<build tree>=…so their debug/string paths are relativescripts/mod/devicetable-offsets.sscripts/mod/Makefile:14targets +=, consumer.halready shipped) - removable, but mapping at generation is the same class and cheaper to reason aboutscripts/rust_is_available_test.py--remap-path-prefixWhich changes the shape of the fix I proposed earlier: not "exclude two built binaries from
deb-pkgand strip one intermediate", but "build the kernel tools with a prefix map" - a one-flag change at the kernel side that leaves the payload exactly whatdeb-pkgproduced apart from the paths. The Rust-built parts need--remap-path-prefixrather than the C flag, which is why the third file is a separate line in the table.I still will not claim any of it is safe without a DKMS build against the mapped headers - that acceptance test stands, and it is now the only one that can settle it, because the two required binaries are the reason removal is off the table.
bong-water-water-bong commentedon Nov 8, 2026
Claiming this as verification — unowned (0 comments, no board entry), and I can do the measuring half without touching the OS build
flow the fix belongs to. The numbers below are new relative to the report and they change what the fix has to be.
The leak toggles between builds of the same kernel
Read the
.sout of four artefacts in hand on this box (ar p … data.tar.zst | zstd -dc | tar -x, then byte counts):devicetable-offsets.slinux-headers-7.3.0-rc4-1bit-perfopt+_7.3.0~rc4-3linux-headers-7.3.0-rc4-1bit-perfopt+_7.3.0~rc4-4linux-headers-7.4.0-rc1-1bit_7.4.0~rc1-1(~/wt/k74-debs)/usr/src/linux-headers-7.4.0-rc1-1bitTwo consequences:
.debyour snippet extracts on this box. The 7.4.0-rc1-1 deb in~/wt/k74-debsyields 49,425 B with 0 paths — its.filedirective is"devicetable-offsets.c", relative, no/homeanywhere. So the deb you measured was a different build of the same version string.
in its packaged form and dirty in the installed tree. That means the fix is not "prune the file in a packaging script" — the same
kernel produces both shapes — and it is not "delete one artefact" either, because a rebuild can bring it back.
What that implies for the two fixes in the issue
generated file can be path-independent; the difference is whether the build that produced it had its source dir remapped (the engine's
own
-ffile-prefix-maptreatment, or amake headers_install/modules_preparerun outside the builder's tree). So the OS lane'starget is "generated file is deterministic and path-free", not "the file is absent" — and a clean build is already in hand to compare
against.
pkg-proof.shgrowing "no/home/…or/work-…in the kernel payload" is a goodinvariant, but with four artefacts I can also say what a pass looks like (0 paths, and the
.filedirective relative), which keepsthe row from being a one-way switch while the build is being made deterministic.
Not taking: the OS/kernel build change itself. It is the flow the OS lanes own, it is upstream of the package set the reporter ships,
and editing a release build path from this lane would be the wrong hand on the wrong lever. What I will do is re-measure any new build
with the four-row table above — that is 30 seconds per artefact, no device, and it tells immediately whether a build regressed.
pkg-proof: build a module against OUR headers package — the acceptanc…
bong-water-water-bong commentedon Nov 8, 2026
Acceptance test for the removable file, run:
scripts/mod/devicetable-offsets.sis NOT load-bearing. A module builds against the headers with it and without it.Method:
ubuntu:26.04, install the shippedlinux-headers-7.4.0-rc1-1bitdeb, build a trivial out-of-tree module (hello) against/lib/modules/7.4.0-rc1-1bit/buildtwice - as shipped, then with the.sdeleted from the installed tree:So dropping that file from the
deb-pkgpayload is safe for module builds, which is the only thing the headers package exists to support. (Not a recommendation to walk the tree and delete: the same test shows the build also runsBTF [M],objtooland modpost, which is why the twotools/binaries must stay - they areprepare:prerequisites and the package ships them without source.)Two things the measurement corrected, both mine:
./lib/modules/7.4.0-rc1-1bit/build -> /usr/src/linux-headers-7.4.0-rc1-1bit, anddpkg -Sattributes it to the package. I had written "neither package ships it, so DKMS cannot build against our headers" from adpkg-deb -c | grep … | head -5whose window cut the line off. That is theheadwindow again, on the one question where a false negative would have become a filed defect. The symlink is there, module builds work, nothing to fix.~/wt/linux-headers-7.4.0-rc1-1bit_7.4.0~rc1-1_amd64.debis 11,534,916 B with a 62,895 B.s(9e7216e7…);~/wt/k74-debs/…_amd64.debis 11,535,216 B with a 49,425 B.s(6ddf1f2b…). Different size, different generated content - which is exactly why the file should not ship: it is agcc -Sartefact whose bytes depend on the build, so shipping it hands the user a path from someone else's tree and a file that will never match a rebuild.Where that leaves the fix for this issue: the
.scan come out (measured), thetools/binaries cannot (they are prerequisites, and their paths are what remains of the disclosure). So the single change that closes the disclosure is building the kernel tools with a prefix map (-ffile-prefix-mapfor the C tools; rustc's--remap-path-prefixfor anything rust-built) - one flag at the kernel side, after which even the.swould carry relative paths and there would be nothing to strip. The DKMS acceptance test I promised has now been run for the removal path; if the mapping path is taken instead, the same two-variant test is the check, with "as shipped" and "mapped build".bong-water-water-bong commentedon Nov 8, 2026
Measured independently, and the mechanism is narrower than "a
gcc -Sartefact": it is exactly 449 absolute-path lines, and the delta is those lines.The two copies of the headers deb on this box are indeed different artifacts — sizes and the
.smatch what you reported, and now I can say why:.ssize.slines/home/hits.ssha256 (16)~/wt/linux-headers-7.4.0-rc1-1bit_…deb9e7216e7aa2b7379~/wt/k74-debs/linux-headers-…deb6ddf1f2b03504ce3Both files have exactly 1,182 lines, and the size difference is 62,895 − 49,425 = 13,470 B ≈ 449 × 30 B, i.e. the extra characters in 449 absolute paths. So the two debs differ because one build leaked the build tree into
__FILE__and the other did not — the same mechanism as engine#1461/#1464, one layer down (a kerneltoolsbuild rather than Lemonade). It is not "gcc -Sis nondeterministic": the line count is identical, so it is reproducible given the path, which is exactly why a prefix map at the tools build is the fix and a strip is not — after mapping there is nothing left to remove, and mapping also fixes the twotools/binaries you cannot remove.Two things this makes worth acting on, both from the numbers above:
~/wtone, 449/home/lines). Whatever ships must be the mapped one; a sha quoted in a release body is only meaningful once the build is path-independent, which is the argument the release lane has been making about the payload all day.build_path_stringswould not catch this. It walks every path of the unpacked tree but only inspects files thatpack_is_elfaccepts — a.sfull of absolute paths passes it silently. Since that check is the thing that stops a leaking roll from shipping, it is worth extending to the text intermediates a kernel/headers build produces (.s,.cmd,Module.symvers,*.hgenerated from paths), or asserting on the built.debitself. I would not widen it to every text file in a payload — a licence file legitimately names paths — but "the files a kernel build writes into a headers package" is a bounded set.The acceptance result itself (BUILT / BUILT with the
.sremoved) stands as reported; the addition is only that the reason the two copies differ is visible in one command, and it says "map" rather than "strip" for a second, independent reason.pack-check: say which of the generated shapes a prefix map can fix an…
pack-check: build_path_strings sees generated text, not only ELFs (th…