1. 26 Oct, 2021 17 commits
  2. 25 Oct, 2021 11 commits
  3. 24 Oct, 2021 2 commits
  4. 23 Oct, 2021 6 commits
  5. 22 Oct, 2021 4 commits
    • Florian Westphal's avatar
      fcnal-test: kill hanging ping/nettest binaries on cleanup · 1f83b835
      Florian Westphal authored
      On my box I see a bunch of ping/nettest processes hanging
      around after fcntal-test.sh is done.
      
      Clean those up before netns deletion.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Acked-by: default avatarDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/20211021140247.29691-1-fw@strlen.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1f83b835
    • Jakub Kicinski's avatar
      Merge branch 'sctp-enhancements-for-the-verification-tag' · 32f8807a
      Jakub Kicinski authored
      Xin Long says:
      
      ====================
      sctp: enhancements for the verification tag
      
      This patchset is to address CVE-2021-3772:
      
        A flaw was found in the Linux SCTP stack. A blind attacker may be able to
        kill an existing SCTP association through invalid chunks if the attacker
        knows the IP-addresses and port numbers being used and the attacker can
        send packets with spoofed IP addresses.
      
      This is caused by the missing VTAG verification for the received chunks
      and the incorrect vtag for the ABORT used to reply to these invalid
      chunks.
      
      This patchset is to go over all processing functions for the received
      chunks and do:
      
      1. Make sure sctp_vtag_verify() is called firstly to verify the vtag from
         the received chunk and discard this chunk if it fails. With some
         exceptions:
      
         a. sctp_sf_do_5_1B_init()/5_2_2_dupinit()/9_2_reshutack(), processing
            INIT chunk, as sctphdr vtag is always 0 in INIT chunk.
      
         b. sctp_sf_do_5_2_4_dupcook(), processing dupicate COOKIE_ECHO chunk,
            as the vtag verification will be done by sctp_tietags_compare() and
            then it takes right actions according to the return.
      
         c. sctp_sf_shut_8_4_5(), processing SHUTDOWN_ACK chunk for cookie_wait
            and cookie_echoed state, as RFC demand sending a SHUTDOWN_COMPLETE
            even if the vtag verification failed.
      
         d. sctp_sf_ootb(), called in many types of chunks for closed state or
            no asoc, as the same reason to c.
      
      2. Always use the vtag from the received INIT chunk to make the response
         ABORT in sctp_ootb_pkt_new().
      
      3. Fix the order for some checks and add some missing checks for the
         received chunk.
      
      This patch series has been tested with SCTP TAHI testing to make sure no
      regression caused on protocol conformance.
      ====================
      
      Link: https://lore.kernel.org/r/cover.1634730082.git.lucien.xin@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      32f8807a
    • Xin Long's avatar
      sctp: add vtag check in sctp_sf_ootb · 9d02831e
      Xin Long authored
      sctp_sf_ootb() is called when processing DATA chunk in closed state,
      and many other places are also using it.
      
      The vtag in the chunk's sctphdr should be verified, otherwise, as
      later in chunk length check, it may send abort with the existent
      asoc's vtag, which can be exploited by one to cook a malicious
      chunk to terminate a SCTP asoc.
      
      When fails to verify the vtag from the chunk, this patch sets asoc
      to NULL, so that the abort will be made with the vtag from the
      received chunk later.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9d02831e
    • Xin Long's avatar
      sctp: add vtag check in sctp_sf_do_8_5_1_E_sa · ef16b173
      Xin Long authored
      sctp_sf_do_8_5_1_E_sa() is called when processing SHUTDOWN_ACK chunk
      in cookie_wait and cookie_echoed state.
      
      The vtag in the chunk's sctphdr should be verified, otherwise, as
      later in chunk length check, it may send abort with the existent
      asoc's vtag, which can be exploited by one to cook a malicious
      chunk to terminate a SCTP asoc.
      
      Note that when fails to verify the vtag from SHUTDOWN-ACK chunk,
      SHUTDOWN COMPLETE message will still be sent back to peer, but
      with the vtag from SHUTDOWN-ACK chunk, as said in 5) of
      rfc4960#section-8.4.
      
      While at it, also remove the unnecessary chunk length check from
      sctp_sf_shut_8_4_5(), as it's already done in both places where
      it calls sctp_sf_shut_8_4_5().
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ef16b173