diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2019-06-28 01:48:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-28 09:28:31 +0300 |
commit | 2a8e1d0c9646f78fdd0f00e2eadf8210bbf810a7 (patch) | |
tree | 1cd31a26b71e808ee8d68a303f267a3f1ef40352 /drivers/gpio/gpio-viperboard.c | |
parent | 36febc9885c7cda0fcafadb6fc7f77deb1811902 (diff) | |
download | linux-2a8e1d0c9646f78fdd0f00e2eadf8210bbf810a7.tar.xz |
sctp: fix error handling on stream scheduler initialization
[ Upstream commit 4d1415811e492d9a8238f8a92dd0d51612c788e9 ]
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@syzkaller.appspotmail.com
Fixes: 5bbbbe32a431 ("sctp: introduce stream scheduler foundations")
Tested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio/gpio-viperboard.c')
0 files changed, 0 insertions, 0 deletions