[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1109040: Subject: linux-headers-6.1.0-37-amd64 missing config files; cannot build external modules on Bookworm



Package: linux-headers-6.1.0-37-amd64
Version: 6.1.140-1
Severity: serious

Hello Debian team,

(First, I wish to apologize for not using the report tool fully. I used it and took the contents of the report from there to complete it, but my SMTP server failed to send the report, so I sent it manually instead. Thank you for understanding. Now to the report.)

I've encountered a serious and reproducible issue with the Debian 12 (Bookworm) kernel headers package that affects the ability to build out-of-tree kernel modules — such as for netfilter hooks or network drivers — using linux-headers-6.1.0-37-amd64.

====================
📌 Problem Summary
====================
The installed kernel headers appear to be incomplete. While the symbolic link /lib/modules/$(uname -r)/build correctly points to /usr/src/linux-headers-6.1.0-37-amd64, this directory relies on shared contents from /usr/src/linux-headers-6.1.0-37-common, which is missing critical build infrastructure.

As a result, any attempt to build a kernel module using the standard external Makefile flow fails or silently produces a broken .ko file that cannot be inserted.

====================
🧨 Symptoms
====================
- make fails with:
  /usr/src/linux-headers-6.1.0-37-common/scripts/Makefile.build:44: /usr/src/linux-headers-6.1.0-37-common/scripts/basic/Makefile: No such file or directory

- If the build succeeds by falling back to linux-source-6.1, the resulting .ko file throws:
  insmod: ERROR: could not insert module netherhook.ko: Invalid module format

====================
🧪 Attempted Fixes
====================
- Tried make olddefconfig / make prepare / make modules_prepare
- Verified all header links and paths are correct
- Compared with working Kali system (same kernel base, properly functioning headers)

====================
✅ Workaround
====================
Only way to build modules is to manually extract linux-source-6.1, manually prepare it with kernel config from /boot/, and avoid the headers package altogether. This breaks DKMS, automated toolchains, and all standard workflows relying on headers.

====================
🔥 Impact
====================
This breaks expected kernel module workflows and contradicts Debian's packaging design, where linux-headers-* should be sufficient to compile out-of-tree modules.

====================
🛠️ Recommendation
====================
Please verify that linux-headers-6.1.0-37-amd64 and -common contain:
- include/config/auto.conf
- include/generated/autoconf.h
- scripts/basic/Makefile
- Proper linker script compatibility (module.lds, etc.)

Thanks for your work maintaining Debian — fixing this will restore a vital dev pipeline.

Respectfully,  
Markus Johnsson  
(NetherTools project)


-- System Information:
Debian Release: 12.11
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-37-amd64 (SMP w/20 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FORCED_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages linux-headers-6.1.0-37-amd64 depends on:
ii  linux-compiler-gcc-12-x86      6.1.140-1
ii  linux-headers-6.1.0-37-common  6.1.140-1
ii  linux-kbuild-6.1               6.1.140-1

linux-headers-6.1.0-37-amd64 recommends no packages.

linux-headers-6.1.0-37-amd64 suggests no packages.

-- no debconf information


--
Med vänlig hälsning / Regards
Markus Johnsson

Mailsuite Sent with Mailsuite  ·  Unsubscribe
07/10/25, 11:20:35 AM

Reply to: