From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: lksctp developers <lksctp-developers@lists.sourceforge.net>,
netdev@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Sridhar Samudrala <sri@us.ibm.com>
Subject: Re: [Lksctp-developers] [PATCH] Fix memory leak in discard case of sctp_sf_abort_violation()
Date: Mon, 12 Nov 2007 10:14:46 -0500 [thread overview]
Message-ID: <47386DE6.4020207@hp.com> (raw)
In-Reply-To: <200711112357.49577.jesper.juhl@gmail.com>
Jesper Juhl wrote:
> From: Jesper Juhl <jesper.juhl@gmail.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@gmail.com>
Thanks. I've applied this to my tree.
-vlad
prev parent reply other threads:[~2007-11-12 15:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-11 22:57 [PATCH] Fix memory leak in discard case of sctp_sf_abort_violation() Jesper Juhl
2007-11-12 15:14 ` Vlad Yasevich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47386DE6.4020207@hp.com \
--to=vladislav.yasevich@hp.com \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lksctp-developers@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=sri@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).