Skip to content

fix(monitor): system monitor verifier error on Ubuntu 18 with clang 12#2633

Merged
AryanBakliwal merged 1 commit into
kubearmor:mainfrom
AryanBakliwal:ubuntu18-clang12-system_monitor-load
May 27, 2026
Merged

fix(monitor): system monitor verifier error on Ubuntu 18 with clang 12#2633
AryanBakliwal merged 1 commit into
kubearmor:mainfrom
AryanBakliwal:ubuntu18-clang12-system_monitor-load

Conversation

@AryanBakliwal

Copy link
Copy Markdown
Member

Purpose of PR?:
System Monitor was failing to load on Ubuntu 18.04 (kernel version 4.15.0-213-generic) with clang version 12 with an eBPF verifier issue

R0=inv0 R1=map_value(id=0,off=0,ks=4,vs=32768,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R2=inv1 R3=fp-28 R6=inv0 R7=map_value(id=0,off=0,ks=4,vs=32768,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R8=inv0 R9=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 fp-264=ctx
	R1 unbounded memory access, make sure to bounds check any array access into a map
2026-05-21 05:55:04.924820	ERROR	Failed to initialize KubeArmor Monitor: failed to initialize BPF: bpf module is nil program kretprobe__execveat: load program: permission denied: R0=inv0 R1=map_value(id=0,off=0,ks=4,vs=32768,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R2=inv1 R3=fp-28 R6=inv0 R7=map_value(id=0,off=0,ks=4,vs=32768,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R8=inv0 R9=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R10=fp0 fp-264=ctx: R1 unbounded memory access, make sure to bounds check any array access into a map (413 line(s) omitted)
github.com/kubearmor/KubeArmor/KubeArmor/log.Err
	/home/vagrant/KubeArmor/KubeArmor/log/logger.go:103
github.com/kubearmor/KubeArmor/KubeArmor/feeder.(*Feeder).Errf
	/home/vagrant/KubeArmor/KubeArmor/feeder/feeder.go:501
github.com/kubearmor/KubeArmor/KubeArmor/core.KubeArmor
	/home/vagrant/KubeArmor/KubeArmor/core/kubeArmor.go:679
main.main
	/home/vagrant/KubeArmor/KubeArmor/main.go:74
runtime.main
	/usr/local/go/src/runtime/proc.go:290

Fixes #2606

Does this PR introduce a breaking change?
No

If the changes in this PR are manually verified, list down the scenarios covered:
Ubuntu 18.04.6 LTS (kernel version 4.15.0-213-generic) with Clang 12
image

Also tested on Ubuntu 24.04.4 LTS (kernel version 6.17.0-29-generic) with Clang 19

Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Checklist:

  • Bug fix. Fixes v1.7.1 release checklist #2606
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Commit has unit tests
  • Commit has integration tests

@AryanBakliwal AryanBakliwal force-pushed the ubuntu18-clang12-system_monitor-load branch from 85078d2 to da4cb33 Compare May 27, 2026 04:44
@AryanBakliwal AryanBakliwal merged commit 4833e47 into kubearmor:main May 27, 2026
19 of 21 checks passed
@rksharma95 rksharma95 mentioned this pull request May 29, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1.7.1 release checklist

3 participants