diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2016-10-25 14:27:39 -0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-29 12:00:10 -0400 |
commit | bf911e985d6bbaa328c20c3e05f4eb03de11fdd6 (patch) | |
tree | 1b27244b2383e75616e7c1d4a3c1faa329108f99 /fs/nfsd/flexfilelayoutxdr.c | |
parent | c2e169be8ce7bde1e4189dc6e72eb9861fe9b6fb (diff) |
sctp: validate chunk len before actually using it
Andrey Konovalov reported that KASAN detected that SCTP was using a slab
beyond the boundaries. It was caused because when handling out of the
blue packets in function sctp_sf_ootb() it was checking the chunk len
only after already processing the first chunk, validating only for the
2nd and subsequent ones.
The fix is to just move the check upwards so it's also validated for the
1st chunk.
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/nfsd/flexfilelayoutxdr.c')
0 files changed, 0 insertions, 0 deletions