[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <47386DE6.4020207@hp.com>
Date: Mon, 12 Nov 2007 10:14:46 -0500
From: Vlad Yasevich <vladislav.yasevich@...com>
To: Jesper Juhl <jesper.juhl@...il.com>
Cc: lksctp developers <lksctp-developers@...ts.sourceforge.net>,
netdev@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Sridhar Samudrala <sri@...ibm.com>
Subject: Re: [Lksctp-developers] [PATCH] Fix memory leak in discard case of
sctp_sf_abort_violation()
Jesper Juhl wrote:
> From: Jesper Juhl <jesper.juhl@...il.com>
>
> In net/sctp/sm_statefuns.c::sctp_sf_abort_violation() we may leak
> the storage allocated for 'abort' by returning from the function
> without using or freeing it. This happens in case
> "sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)" is true and we jump to
> the 'discard' label.
> Spotted by the Coverity checker.
>
> The simple fix is to simply move the creation of the "abort chunk"
> to after the possible jump to the 'discard' label. This way we don't
> even have to allocate the memory at all in the problem case.
>
>
> Signed-off-by: Jesper Juhl <jesper.juhl@...il.com>
Thanks. I've applied this to my tree.
-vlad
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists