jow- / nlbwmon

Simple conntrack based traffic accounting
ISC License
147 stars 33 forks source link

Nlbwmon issue with Stack Protection Strong #22

Closed gwlim closed 6 years ago

gwlim commented 6 years ago

When build with the following stack protection Following is encountered

Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.628673] 
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.628673] do_page_fault(): sending SIGSEGV to nlbwmon for invalid write access to 00000000
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.637289] epc = 771a0c64 in libc.so[77180000+a0000]
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.642456] ra  = 564a91a8 in nlbwmon[564a4000+a000]
Mon Aug  7 10:40:33 2017 kern.info kernel: [   45.647550] 
  @@ -178,7 +178,7 @@ menu "Global build settings"
        choice
            prompt "User space Stack-Smashing Protection"
            depends on USE_MUSL
    -       default PKG_CC_STACKPROTECTOR_REGULAR
    +       default PKG_CC_STACKPROTECTOR_STRONG
            help
              Enable GCC Stack Smashing Protection (SSP) for userspace applications
            config PKG_CC_STACKPROTECTOR_NONE
    @@ -196,7 +196,7 @@ menu "Global build settings"

        choice
            prompt "Kernel space Stack-Smashing Protection"
    -       default KERNEL_CC_STACKPROTECTOR_REGULAR
    +       default KERNEL_CC_STACKPROTECTOR_STRONG
            depends on USE_MUSL || !(x86_64 || i386)
            help
              Enable GCC Stack-Smashing Protection (SSP) for the kernel
gwlim commented 6 years ago

Using the version in lede-17.01 current

gwlim commented 6 years ago

I have tested it is fixed with the commit https://github.com/jow-/nlbwmon/commit/73bfd7f26728408b296a18d30994eb852ec2fc4a Please push the patch to lede-current and lede-stable. Thanks