Giter VIP home page Giter VIP logo

ebpfguard's People

Contributors

dependabot[bot] avatar noboruma avatar tomaszjonak avatar vadorovsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ebpfguard's Issues

all example not able to run on ubuntu-jammy-22.04-amd64-server on ec2

  Compiling clap v4.2.7
   Compiling ebpfguard-common v0.1.0 (/home/ubuntu/ebpfguard/ebpfguard-common)
   Compiling ebpfguard v0.1.0 (/home/ubuntu/ebpfguard/ebpfguard)
   Compiling file_open v0.1.0 (/home/ubuntu/ebpfguard/examples/file_open)
    Finished dev [unoptimized + debuginfo] target(s) in 34.36s
sudo: target/debug/examples/file_open: command not found
Failed to run `sudo -E target/debug/examples/file_open --path-to-deny /tmp/test`

let me known if I'm missing anything @noboruma @tomaszjonak

eBPF: bpf-linker sigsegv in release mode

error: linking with `bpf-linker` failed: signal: 11 (SIGSEGV) (core dumped)
  |
  = note: LC_ALL="C" PATH="/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/user/.local/bin:/home/user/.local/bin:/home/user/.local/bin:/home/user/.cargo/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/go/bin:/usr/local/go/bin:/usr/local/go/bin" VSLANG="1033" "bpf-linker" "--export-symbols" "/tmp/rustcxgmdFZ/symbols" "/tmp/rustcxgmdFZ/symbols.o" "/home/user/deepfence/experimental/ebpfguard/ebpfguard-ebpf/../target/bpfel-unknown-none/release/deps/ebpfguard-04a7e4f8d4e9bade.ebpfguard.97ac88886015d5ba-cgu.0.rcgu.o" "-L" "/home/user/deepfence/experimental/ebpfguard/ebpfguard-ebpf/../target/bpfel-unknown-none/release/deps" "-L" "/home/user/deepfence/experimental/ebpfguard/ebpfguard-ebpf/../target/release/deps" "-L" "/home/user/deepfence/experimental/ebpfguard/ebpfguard-ebpf/../target/bpfel-unknown-none/release/build/ebpfguard-ebpf-09853f90652e03f0/out" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/bpfel-unknown-none/lib" "/home/user/deepfence/experimental/ebpfguard/ebpfguard-ebpf/../target/bpfel-unknown-none/release/build/ebpfguard-ebpf-09853f90652e03f0/out/vmlinux_access.o" "--cpu" "generic" "--cpu-features" "" "-L" "/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/bpfel-unknown-none/lib" "-o" "/home/user/deepfence/experimental/ebpfguard/ebpfguard-ebpf/../target/bpfel-unknown-none/release/deps/ebpfguard-04a7e4f8d4e9bade" "-O3" "--debug"
  = note: PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
          Stack dump:
          0.    Running pass 'Function Pass Manager' on module 'ebpfguard-04a7e4f8d4e9bade'.
          1.    Running pass 'BPF Assembly Printer' on function '@prog_bprm_check_security'
          16:54:59 [WARN] ignoring file "/tmp/rustcxgmdFZ/symbols.o": no embedded bitcode
          

error: could not compile `ebpfguard-ebpf` (bin "ebpfguard") due to previous error

Readme example bpf code fails verifier on debian 11 with 5.10.0 kernel

https://github.com/deepfence/ebpfguard/tree/3bcc2e8250cae04cf9863896229b0578ad9a8092/examples/readme_mount

Error: attach_sb_mount

Caused by:
    0: Failed to load BPF program: the BPF_PROG_LOAD syscall failed. Verifier output: 0: (bf) r6 = r1
       1: (85) call unknown#158
       invalid func unknown#158
       verification time 783 usec
       stack depth 0
       processed 2 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
       
    1: the BPF_PROG_LOAD syscall failed. Verifier output: 0: (bf) r6 = r1
       1: (85) call unknown#158
       invalid func unknown#158
       verification time 783 usec
       stack depth 0
       processed 2 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
       
    2: Invalid argument (os error 22)

SocketConnect: no enforcement on ubuntu 22.04

As title states. Ubuntu 22.04 LTS. Kernel 5.19.0-46-generic

        socket_connect.add_policy(SocketConnect {
            subject: PolicySubject::Binary("/usr/bin/curl".into()),
            allow: Addresses::All,
            deny: Addresses::Addresses(vec![IpAddr::from([127u8, 1u8, 2u8, 3u8])]),
        }).await?;

Add recommendation to use musl libc target to readme

Since we depend on a shim c layer differences in GLIBC versions may matter if build and runtime environments are different enough. This may result in errors akin to the following.

./demo_socket_listen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./demo_socket_listen)
./demo_socket_listen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./demo_socket_listen)
./demo_socket_listen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./demo_socket_listen)

If app deployment is containerized it shouldn't matter as the user controls libc version. Still calling this out explicitly wont hurt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.