Context
DMA/hardware-level memory access via /dev/mem bypasses all software protections. No hook exists to block it.
Work
- Extend
ebpf/owlbear_lsm.bpf.c owl_file_open: if dentry name is mem or kmem and parent is dev, return -EPERM
- New event
OWL_EVENT_DEV_MEM_ACCESS (0x0106) in include/owlbear_events.h and ebpf/owlbear_common.bpf.h
- New
cheats/dev_mem_reader.c: attempts to open /dev/mem
Tests
2 E2E assertions (open blocked with EPERM, event emitted).
Part of v2.0.0
Context
DMA/hardware-level memory access via /dev/mem bypasses all software protections. No hook exists to block it.
Work
ebpf/owlbear_lsm.bpf.cowl_file_open: if dentry name ismemorkmemand parent isdev, return -EPERMOWL_EVENT_DEV_MEM_ACCESS(0x0106) ininclude/owlbear_events.handebpf/owlbear_common.bpf.hcheats/dev_mem_reader.c: attempts to open /dev/memTests
2 E2E assertions (open blocked with EPERM, event emitted).
Part of v2.0.0