Giter Site home page Giter Site logo

bpfcountd's People

Contributors

codefetch avatar jue89 avatar lemoer avatar t-x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

codefetch t-x

bpfcountd's Issues

License?

Can you think about what license you would like to use for this project?

I would like to use your project in a commercial project if your desired license allows that. In return I want to implement reloading the filter file using a signal.

Local denial of service - triggering SIGPIPE in the deamon

Local user with access to the UNIX Socket can cause bpfcountd to exit with SIGPIPE simply by connecting to the socket and close it without reading any data causing local denial of service.

Tested on Arch Linux / x86-64.

(gdb) r  -i wls1 -f ./filters.example
Starting program: [...]/git-github/bpfcountd/bpfcountd -i wls1 -f ./filters.example
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Device: wls1
id: arp-req; bpf: "arp[6:2] == 1";
id: arp-rep-norm; bpf: "not ether broadcast and arp[6:2] == 2";
id: arp-rep-grat; bpf: "ether broadcast and arp[6:2] == 2 and ether src 00:26:c6:12:6f:a4";

Program received signal SIGPIPE, Broken pipe.
0x00007ffff78d7c7d in send () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff78d7c7d in send () from /usr/lib/libc.so.6
#1  0x00000000004019cb in usock_sendstr (client_sock=5, str=0x7fffffffe5a0 "arp-rep-grat:0:0\n") at usock.c:45
#2  0x000000000040178b in main (argc=5, argv=0x7fffffffeae8) at main.c:158

You can reproduce the bug with this code:

sock.c.txt

>> ./sock ../test.sock 
prepare socket ... done
connecting to bpfcountd ... done
trigger SIGPIPE in bpfcountd ... done
testing if bpfcountd died ... yes rawr!

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.