mirror of
https://github.com/torvalds/linux
synced 2024-11-02 18:48:59 +00:00
sctp: remove unreachable code from sctp_sf_violation_chunk()
sctp_sf_violation_chunk() is not called with asoc argument equal to NULL, but if that happens it would lead to NULL pointer dereference in sctp_vtag_verify(). The patch removes code that handles NULL asoc in sctp_sf_violation_chunk(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Proposed-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8ac9dfd58b
commit
e7ea51cd87
1 changed files with 0 additions and 3 deletions
|
@ -4898,9 +4898,6 @@ static enum sctp_disposition sctp_sf_violation_chunk(
|
|||
{
|
||||
static const char err_str[] = "The following chunk violates protocol:";
|
||||
|
||||
if (!asoc)
|
||||
return sctp_sf_violation(net, ep, asoc, type, arg, commands);
|
||||
|
||||
return sctp_sf_abort_violation(net, ep, asoc, arg, commands, err_str,
|
||||
sizeof(err_str));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue