Merge remote-tracking branch 'origin/issue-920-fix-crash-sctp' into integration_2025_w12 (!3315)

SCTP: avoid assert on partial SCTP message

The receive buffer for SCTP, before this branch, is 8192. If a message
is larger, we receive only a partial message, which makes the gNB abort.
Remove the abort to not be susceptible to a message intended to crash
the gNB.

also, increase the receive buffer to be more forgiving for large messages

Closes: #920
This commit is contained in:
Robert Schmidt
2025-03-21 12:27:25 +01:00
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -26,6 +26,6 @@
#define SCTP_IN_STREAMS (16)
#define SCTP_MAX_ATTEMPTS (8)
#define SCTP_TIMEOUT (60000)
#define SCTP_RECV_BUFFER_SIZE (8192)
#define SCTP_RECV_BUFFER_SIZE (65536)
#endif /* SCTP_DEFAULT_VALUES_H_ */
+2 -2
View File
@@ -806,8 +806,8 @@ sctp_eNB_read_from_socket(
}
if (!(flags & MSG_EOR)) {
SCTP_ERROR("fatal: partial SCTP messages are not handled\n");
exit_fun("fatal: partial SCTP messages are not handled" );
SCTP_ERROR("partial SCTP message received, discarding message\n");
return;
}
if (flags & MSG_NOTIFICATION) {