Attention is currently required from: neels, pespin.
laforge has posted comments on this change by neels. (
https://gerrit.osmocom.org/c/libosmo-netif/+/37991?usp=email )
Change subject: coverity CID#322728
......................................................................
Patch Set 1:
(1 comment)
File src/stream.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/37991/comment/4dd37f9b_179604b… :
PS1, Line 282: ret = sctp_recvmsg(fd, msg->tail, msgb_tailroom(msg), NULL, NULL,
&sinfo, &flags);
man sctp_recvmsg is a bit blurry on whether sinfo
needs to be initialized, so I think it's fine to b […]
I would assume that any
such socket related call will not need zero-initialization of pure output arguments. If
it's an input, it needs initialization. But it's exclusively a caller-allocated
chunk of memory for output.
Lookig at the actual implementation at
https://github.com/sctp/lksctp-tools/blob/master/src/lib/recvmsg.c - there is a code path
in case recvmsg returns a non-error resposne but then no cmsg for SCTP_SNDRCV is found. In
that case it's not initialized by sctp_recvmsg. But then it is a kernel bug and
zero-initialization is just plastering over it. Our code needs the sctp_sndrcvinfo to
know which stream / PPID the message was received on.
So I think this change is "side-ways development" and not addressing the actual
issue: There should probably be an ASSERT or soemthing in libsctp... I'll raise a bug
there.
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/37991?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ia4c6b7c6f16331932e3f584b800e86d422a4f019
Gerrit-Change-Number: 37991
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 03 Sep 2024 09:17:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>