• Bug#1060285: mptcpd: FTBFS with a segmentation fault in the testsuite w

    From Aurelien Jarno@21:1/5 to All on Mon Jan 8 21:30:01 2024
    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-riscv@lists.debian.org
    Usertags: riscv64
    X-Debbugs-Cc: debian-riscv@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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Fri Jan 12 22:40:01 2024
    This is a multi-part message in MIME format...

    Your message dated Fri, 12 Jan 2024 21:34:24 +0000
    with message-id <E1rOPAW-009bH9-Kg@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 owner@bugs.debian.org
    immediately.)


    --
    1060285: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060285
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    Received: (at submit) by bugs.debian.org; 8 Jan 2024 20:18:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-110.4 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH,
    DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FOURLA,
    FROMDEVELOPER,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,
    UNPARSEABLE_RELAY,USER_IN_DKIM_WELCOMELIST,USER_IN_DKIM_WHITELIST,
    WORD_WITHOUT_VOWELS,XMAILER_REPORTBUG autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 24; hammy, 150; neutral, 161; spammy,
    0. spammytokens:
    hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
    0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
    0.000-+--H*RT:108, 0.000-+--H*RT:311
    Return-path: <aurel32@debian.org>
    R