Your message dated Fri, 12 Jan 2024 21:34:24 +0000
with message-id <e1ropaw-009bh9...@fasolo.debian.org>
and subject line Bug#1060285: fixed in mptcpd 0.12-3
has caused the Debian Bug report #1060285,
regarding mptcpd: FTBFS with a segmentation fault in the testsuite when SCTP 
disabled and no /etc/protocols
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1060285: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060285
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: mptcpd
Version: 0.12-2
Severity: serious
Tags: ftbfs upstream
Justification: fails to build from source (but built successfully in the past)
User: debian-ri...@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-ri...@lists.debian.org

Dear maintainer,

On riscv64, mptcpd fails to build from source with a segmentation fault
in the test-mptcpwrap test:

| =======================================
|    mptcpd 0.12: tests/test-suite.log
| =======================================
| 
| # TOTAL: 19
| # PASS:  17
| # SKIP:  1
| # XFAIL: 0
| # FAIL:  1
| # XPASS: 0
| # ERROR: 0
| 
| .. contents:: :depth: 2
| 
| SKIP: test-start-stop
| =====================
| 
| Running non-interactive sudo check...
| sudo: a password is required
|     fail, skipping the test
| SKIP test-start-stop (exit status: 77)
| 
| FAIL: test-mptcpwrap
| ====================
| 
| Test case 0: PASS
| Test case 1: Segmentation fault
| FAIL test-mptcpwrap (exit status: 139)

A full build log is available here:
https://buildd.debian.org/status/fetch.php?pkg=mptcpd&arch=riscv64&ver=0.12-2%2Bb1&stamp=1704714971&raw=0

Investigation shows that 3 conditions are needed to trigger this issue:
- A recent kernel that supports mptcp, to be checked with
  /proc/sys/net/mptcp/enabled
- Something that prevents SCTP to be used, for instance on the build
  daemons /proc/sys/kernel/modules_disabled is set to 1, preventing the
  sctp.ko module to be loaded
- A system without /etc/protocols, for instance without the netbase
  package installed.

With this three conditions, this triggers the following code path from
the mptcpwrap-tester.c file:

| static void test_socket_data(struct socket_data const *data)
| {
|         int const fd = socket(data->domain, data->type, data->protocol);
| 
|         if (fd == -1) {
|                 if (errno == EPROTONOSUPPORT) {
|                         struct protoent const *const p =
|                                 getprotobynumber(data->protocol);
| 
|                         fprintf(stderr,
|                                 "WARNING: Ignoring unsupported "
|                                 "protocol: %d - %s\n",
|                                 data->protocol,
|                                 p->p_name);
| 
|                         return;
|                 }

The output of getprotobynumber() is used directly, without checking for
a NULL pointer in case of error, for instance because /etc/protocols
does not exist. This causes a segmentation fault when trying to
dereference it. A workaround is to build-depends on netbase, and a
proper fix to test for this error.

In the latest rebuild of mptpcd, the conditions where met only on the
riscv64 buildd, and riscv64 is not a release architecture. That said a
few mips64el buildds also met the 3 conditions and it will be the case
of more and more buildds once they are upgraded to bookworm. I am
therefore filling this issue as severity serious.

Regards
Aurelien

--- End Message ---
--- Begin Message ---
Source: mptcpd
Source-Version: 0.12-3
Done: Matthieu Baerts (NGI0) <matt...@kernel.org>

We believe that the bug you reported is fixed in the latest version of
mptcpd, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1060...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthieu Baerts (NGI0) <matt...@kernel.org> (supplier of updated mptcpd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 11 Jan 2024 14:55:36 +0100
Source: mptcpd
Architecture: source
Version: 0.12-3
Distribution: unstable
Urgency: medium
Maintainer: Matthieu Baerts <matt...@kernel.org>
Changed-By: Matthieu Baerts (NGI0) <matt...@kernel.org>
Closes: 1060285
Changes:
 mptcpd (0.12-3) unstable; urgency=medium
 .
   * debian: build-dep: add netbase. (Closes: #1060285)
     - Aurelien Jarno found out that the unit tests can crash when SCTP is
       disabled and netbase is not installed. A fix for the crash in the unit
       tests is available upstream, but it is not needed if netbase has been
       added to the list of dependences. This package will also help displaying 
a
       better warning message.
   * debian: lintian: fix mptcp.service path.
     - The path can be different depending on the architecture, since 0.12-2. 
The
       lintian override file was not taking this into consideration.
Checksums-Sha1:
 e275e0c908e1b4a0009eb6c8103126a83e957142 2273 mptcpd_0.12-3.dsc
 54971ef0de75872cf81f8af7a868a361fcc9d595 7048 mptcpd_0.12-3.debian.tar.xz
 05374d97f531db2a46438893e519522f80d1e15d 8694 mptcpd_0.12-3_source.buildinfo
Checksums-Sha256:
 8a1f023a63488e8eb6e42b90bca1ba68375f79101e27434da478a1ad73bb2bb8 2273 
mptcpd_0.12-3.dsc
 e7c6c95bbfe880af8fcafa21f0c077234cccf6f3bdb5bac701b3f2a03704b18e 7048 
mptcpd_0.12-3.debian.tar.xz
 eaa3088ba63a33fe5c447400dd18aca146a8da43f5290d8f7c7dec45640f2c9f 8694 
mptcpd_0.12-3_source.buildinfo
Files:
 d25acf54e7a402d53de39c7581e1fbdf 2273 net optional mptcpd_0.12-3.dsc
 e9d71855b67e188668fdab25cd5e375c 7048 net optional mptcpd_0.12-3.debian.tar.xz
 5283085bae34d512ecaa59f8c5eb4eb1 8694 net optional 
mptcpd_0.12-3_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEUryGlb40+QrX1Ay4E4jA+JnoM2sFAmWhrFoACgkQE4jA+Jno
M2udpA//fXtL0oOyjRQ3gIdQQPx2P2i0MocvzpSX+Mqq28ci9XZfx75Zx3vBO2Cc
XNKGUYm37Il5rLh18kk7bBJQ8f3HTU8fhqdiQoyjc7m3MUJSl9NnBGgU0rxa3hw4
gjVgTBEBuB2zg6WzAxcXzbDPoQuFN/0rSMOgjN8pph9fzKvgKLNS0QIoBzwgm2AF
UlwFo+aLKUPfMtNPKd8s75PMGsfbVjw4zxFut8Gi3E02F7YMGGpZ1v4NYhhb4Go9
nVB7JyceBPR9TDPeSNvvupVKlxWZfHQCfuhFJ6/9obpRWd6E9OF4V7eZgQgXKZyn
Bx6el34q8DEkPJKH6xd6Wj7lu3DBqmV5yVqRbZc4x/GoUgUmDZ1UrI4Qxkf0zHTI
egsFvw4xJYSZpodZpb3+ax3OyKoznZZ/9Pd+nfi8PhmWZnvbXlO223FaY88PhnI+
pg81Bv/xdPsZqXCAmqvqDzdz8OgCeLpdqtyWcszE+wsbR2TRZRAZXhsyF41WfGdD
owG1gKABOn2Qv2BmfDyDeg4CdsRQ7KGMAbsjfgQW542Dc/emez4eJVoVvPJGKoE7
u7tt38iVc7+4OxV75I4mt1VjN8KzS850qx1pD3Qb56GAB3Xy4VkUdLe1UyV7oIDz
VaQgvPXiFT0GS+XAi/nEPfzt69wiQxIG2/oLD18/44oOtoN7ZhU=
=6WR/
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to