[lvc-project] [PATCH 5.10] sctp: remove unreachable code from sctp_sf_violation_chunk()
George Rurikov
g.ryurikov at securitycode.ru
Tue Oct 8 16:38:18 MSK 2024
From: George Ryurikov <g.ryurikov at securitycode.ru>
From: Alexey Khoroshilov <khoroshilov at ispras.ru>
commit e7ea51cd879c8214a824717d28a169b5f2262c02 upstream.
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 at ispras.ru>
Proposed-by: Xin Long <lucien.xin at gmail.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: George Ryurikov <g.ryurikov at securitycode.ru>
---
net/sctp/sm_statefuns.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 1e82c51657a7..544c1e02edb3 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -4794,9 +4794,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));
}
--
2.34.1
Заявление о конфиденциальности
Данное электронное письмо и любые приложения к нему являются конфиденциальными и предназначены исключительно для адресата. Если Вы не являетесь адресатом данного письма, пожалуйста, уведомите немедленно отправителя, не раскрывайте содержание другим лицам, не используйте его в каких-либо целях, не храните и не копируйте информацию любым способом.
More information about the lvc-project
mailing list