Menu

#5 segfault if IP capture disabled, accessing unallocated array

open
nobody
None
8
2012-09-14
2006-12-10
John Hardin
No

It looks like ctl_init_arrays() tries to clear out data structures (specifically, ctl.nk_array) that don't have memory allocated if IP capture is disabled with -x, leading to a segfault. Candidate patch attached.

Discussion

  • John Hardin

    John Hardin - 2006-12-10

    Patch to skip access of unallocated ctl.nk_array

     
  • John Hardin

    John Hardin - 2006-12-10

    Logged In: YES
    user_id=786519
    Originator: YES

    and another one in util.c

    This is pretty Q'n'D, I'd appreciate someone with a clearer mental model of LaBrea reviewing this.
    Basically what I'm trying to do is modify LaBrea so it can tarpit traffic to just specific ports on only the local system - make it into a service tarpit in addition to a netblock scan tarpit.
    File Added: util_nk_array-segfault.patch

     
  • John Hardin

    John Hardin - 2006-12-10
     
  • John Hardin

    John Hardin - 2006-12-10

    Don't calculate offset into uninitialized array

     
  • John Hardin

    John Hardin - 2006-12-10

    Logged In: YES
    user_id=786519
    Originator: YES

    and clean up pkt_handler.c just a bit too.
    File Added: pkt_handler-segfault.patch

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.