Re: RSTPD user mode daemon segfaults with kernel 2.6.24

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, the fix for this is:

commit 8172012df1d981ef1934ede430c4936eae50e5f7
Author: Srinivas Aji <Aji_Srinivas@xxxxxxx>
Date:   Thu Jul 3 22:45:03 2008 +0530

    Fix crash when BPDU received on bridge if.

    We could receive non STP BPDU's on bridge interface, or even STP BPDUs
    if STP is off for the bridge. The crash is avoided by checking for bridge
    interface and not processing further in that case.

    Patch based on one from Solomon Peachy <solomon@xxxxxxxxxxxxxx>

diff --git a/bridge_track.c b/bridge_track.c
index e93c014..802db7a 100644
--- a/bridge_track.c
+++ b/bridge_track.c
@@ -447,6 +447,12 @@ void bridge_bpdu_rcv(int if_index, const unsigned char *dat
        if (!ifc)
                return;

+       /* We could get a STP BPDU from a bridge interface if STP is off,
+          or a non STP packet as well, e.g. GMRP, even when STP is on.
+          Don't process it, else we will crash at ifc->master->stp_up */
+       if (ifc->is_bridge)
+               return;
+
        TST(ifc->up,);
        if (!ifc->master->stp_up)
                return;


On Fri, Jan 2, 2009 at 11:23 PM, Antonio Di Bacco <a.dibacco@xxxxxxxxx> wrote:
> Hi,
>
> I have downloaded rstp from sourceforge and I get a segfaults when running
> the daemon.
> This is the line where the problem arises:
>
>     TST(ifc->master->stp_up,);
>
> just at the beginning of function:
>
>   void bridge_bpdu_rcv(int if_index, const unsigned char *data, int len)
>
> in file bridge_track.c
>
>
> _______________________________________________
> Bridge mailing list
> Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/bridge
>
_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/bridge

[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux