1. 18 Sep, 2018 3 commits
    • Stefan Nuernberger's avatar
      net/ipv4: defensive cipso option parsing · 076ed3da
      Stefan Nuernberger authored
      commit 40413955 ("Cipso: cipso_v4_optptr enter infinite loop") fixed
      a possible infinite loop in the IP option parsing of CIPSO. The fix
      assumes that ip_options_compile filtered out all zero length options and
      that no other one-byte options beside IPOPT_END and IPOPT_NOOP exist.
      While this assumption currently holds true, add explicit checks for zero
      length and invalid length options to be safe for the future. Even though
      ip_options_compile should have validated the options, the introduction of
      new one-byte options can still confuse this code without the additional
      checks.
      Signed-off-by: default avatarStefan Nuernberger <snu@amazon.com>
      Cc: David Woodhouse <dwmw@amazon.co.uk>
      Cc: Simon Veith <sveith@amazon.de>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarPaul Moore <paul@paul-moore.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      076ed3da
    • Jia-Ju Bai's avatar
      net: socionext: Fix two sleep-in-atomic-context bugs in ave_rxfifo_reset() · 0020f5c8
      Jia-Ju Bai authored
      The driver may sleep with holding a spinlock.
      The function call paths (from bottom to top) in Linux-4.17 are:
      
      [FUNC] usleep_range
      drivers/net/ethernet/socionext/sni_ave.c, 892:
      	usleep_range in ave_rxfifo_reset
      drivers/net/ethernet/socionext/sni_ave.c, 932:
      	ave_rxfifo_reset in ave_irq_handler
      
      [FUNC] usleep_range
      drivers/net/ethernet/socionext/sni_ave.c, 888:
      	usleep_range in ave_rxfifo_reset
      drivers/net/ethernet/socionext/sni_ave.c, 932:
      	ave_rxfifo_reset in ave_irq_handler
      
      To fix these bugs, usleep_range() is replaced with udelay().
      
      These bugs are found by my static analysis tool DSAC.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0020f5c8
    • Colin Ian King's avatar
      net: caif: remove redundant null check on frontpkt · 5d288b88
      Colin Ian King authored
      It is impossible for frontpkt to be null at the point of the null
      check because it has been assigned from rearpkt and there is no
      way rearpkt can be null at the point of the assignment because
      of the sanity checking and exit paths taken previously. Remove
      the redundant null check.
      
      Detected by CoverityScan, CID#114434 ("Logically dead code")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d288b88
  2. 17 Sep, 2018 35 commits
  3. 16 Sep, 2018 2 commits