[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190701.190224.767132828354505683.davem@davemloft.net>
Date: Mon, 01 Jul 2019 19:02:24 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: marcelo.leitner@...il.com
Cc: netdev@...r.kernel.org, lucien.xin@...il.com,
nhorman@...driver.com, linux-sctp@...r.kernel.org, hdanton@...a.com
Subject: Re: [PATCH net] sctp: fix error handling on stream scheduler
initialization
From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Date: Thu, 27 Jun 2019 19:48:10 -0300
> It allocates the extended area for outbound streams only on sendmsg
> calls, if they are not yet allocated. When using the priority
> stream scheduler, this initialization may imply into a subsequent
> allocation, which may fail. In this case, it was aborting the stream
> scheduler initialization but leaving the ->ext pointer (allocated) in
> there, thus in a partially initialized state. On a subsequent call to
> sendmsg, it would notice the ->ext pointer in there, and trip on
> uninitialized stuff when trying to schedule the data chunk.
>
> The fix is undo the ->ext initialization if the stream scheduler
> initialization fails and avoid the partially initialized state.
>
> Although syzkaller bisected this to commit 4ff40b86262b ("sctp: set
> chunk transport correctly when it's a new asoc"), this bug was actually
> introduced on the commit I marked below.
>
> Reported-by: syzbot+c1a380d42b190ad1e559@...kaller.appspotmail.com
> Fixes: 5bbbbe32a431 ("sctp: introduce stream scheduler foundations")
> Tested-by: Xin Long <lucien.xin@...il.com>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists