1. 27 Oct, 2021 1 commit
    • Guangbin Huang's avatar
      net: hns3: fix pause config problem after autoneg disabled · 3bda2e5d
      Guangbin Huang authored
      If a TP port is configured by follow steps:
      1.ethtool -s ethx autoneg off speed 100 duplex full
      2.ethtool -A ethx rx on tx on
      3.ethtool -s ethx autoneg on(rx&tx negotiated pause results are off)
      4.ethtool -s ethx autoneg off speed 100 duplex full
      
      In step 3, driver will set rx&tx pause parameters of hardware to off as
      pause parameters negotiated with link partner are off.
      
      After step 4, the "ethtool -a ethx" command shows both rx and tx pause
      parameters are on. However, pause parameters of hardware are still off
      and port has no flow control function actually.
      
      To fix this problem, if autoneg is disabled, driver uses its saved
      parameters to restore pause of hardware. If the speed is not changed in
      this case, there is no link state changed for phy, it will cause the pause
      parameter is not taken effect, so we need to force phy to go down and up.
      
      Fixes: aacbe27e ("net: hns3: modify how pause options is displayed")
      Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3bda2e5d
  2. 26 Oct, 2021 17 commits
  3. 25 Oct, 2021 11 commits
  4. 24 Oct, 2021 2 commits
  5. 23 Oct, 2021 6 commits
  6. 22 Oct, 2021 3 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