1. 29 Jul, 2019 5 commits
    • Jia-Ju Bai's avatar
      net: sched: Fix a possible null-pointer dereference in dequeue_func() · 051c7b39
      Jia-Ju Bai authored
      In dequeue_func(), there is an if statement on line 74 to check whether
      skb is NULL:
          if (skb)
      
      When skb is NULL, it is used on line 77:
          prefetch(&skb->end);
      
      Thus, a possible null-pointer dereference may occur.
      
      To fix this bug, skb->end is used when skb is not NULL.
      
      This bug is found by a static analysis tool STCheck written by us.
      
      Fixes: 76e3cc12 ("codel: Controlled Delay AQM")
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      051c7b39
    • Jesper Dangaard Brouer's avatar
      MAINTAINERS: Remove mailing-list entry for XDP (eXpress Data Path) · a7f9cbf0
      Jesper Dangaard Brouer authored
      This removes the mailing list xdp-newbies@vger.kernel.org from the XDP
      kernel maintainers entry.
      
      Being in the kernel MAINTAINERS file successfully caused the list to
      receive kbuild bot warnings, syzbot reports and sometimes developer
      patches. The level of details in these messages, doesn't match the
      target audience of the XDP-newbies list. This is based on a survey on
      the mailing list, where 73% voted for removal from MAINTAINERS file.
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7f9cbf0
    • Gustavo A. R. Silva's avatar
      arcnet: arc-rimi: Mark expected switch fall-throughs · 26027f42
      Gustavo A. R. Silva authored
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings (Building: powerpc allyesconfig):
      
      drivers/net/arcnet/arc-rimi.c: In function 'arcrimi_setup':
      include/linux/printk.h:304:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/arcnet/arc-rimi.c:365:3: note: in expansion of macro 'pr_err'
         pr_err("Too many arguments\n");
         ^~~~~~
      drivers/net/arcnet/arc-rimi.c:366:2: note: here
        case 3:  /* Node ID */
        ^~~~
      drivers/net/arcnet/arc-rimi.c:367:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
         node = ints[3];
         ~~~~~^~~~~~~~~
      drivers/net/arcnet/arc-rimi.c:368:2: note: here
        case 2:  /* IRQ */
        ^~~~
      drivers/net/arcnet/arc-rimi.c:369:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
         irq = ints[2];
         ~~~~^~~~~~~~~
      drivers/net/arcnet/arc-rimi.c:370:2: note: here
        case 1:  /* IO address */
        ^~~~
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26027f42
    • Gustavo A. R. Silva's avatar
      arcnet: com90io: Mark expected switch fall-throughs · 56f37a3f
      Gustavo A. R. Silva authored
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings (Building: powerpc allyesconfig):
      
      drivers/net/arcnet/com90io.c: In function 'com90io_setup':
      include/linux/printk.h:304:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/arcnet/com90io.c:365:3: note: in expansion of macro 'pr_err'
         pr_err("Too many arguments\n");
         ^~~~~~
      drivers/net/arcnet/com90io.c:366:2: note: here
        case 2:  /* IRQ */
        ^~~~
      drivers/net/arcnet/com90io.c:367:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
         irq = ints[2];
         ~~~~^~~~~~~~~
      drivers/net/arcnet/com90io.c:368:2: note: here
        case 1:  /* IO address */
        ^~~~
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56f37a3f
    • Gustavo A. R. Silva's avatar
      arcnet: com90xx: Mark expected switch fall-throughs · f3eb2c33
      Gustavo A. R. Silva authored
      Mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warnings (Building: powerpc allyesconfig):
      
      drivers/net/arcnet/com90xx.c: In function 'com90xx_setup':
      include/linux/printk.h:304:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
        printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/arcnet/com90xx.c:695:3: note: in expansion of macro 'pr_err'
         pr_err("Too many arguments\n");
         ^~~~~~
      drivers/net/arcnet/com90xx.c:696:2: note: here
        case 3:  /* Mem address */
        ^~~~
      drivers/net/arcnet/com90xx.c:697:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
         shmem = ints[3];
         ~~~~~~^~~~~~~~~
      drivers/net/arcnet/com90xx.c:698:2: note: here
        case 2:  /* IRQ */
        ^~~~
      drivers/net/arcnet/com90xx.c:699:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
         irq = ints[2];
         ~~~~^~~~~~~~~
      drivers/net/arcnet/com90xx.c:700:2: note: here
        case 1:  /* IO address */
        ^~~~
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f3eb2c33
  2. 27 Jul, 2019 6 commits
  3. 26 Jul, 2019 10 commits
  4. 25 Jul, 2019 18 commits
  5. 24 Jul, 2019 1 commit
    • Cong Wang's avatar
      netrom: hold sock when setting skb->destructor · 4638faac
      Cong Wang authored
      sock_efree() releases the sock refcnt, if we don't hold this refcnt
      when setting skb->destructor to it, the refcnt would not be balanced.
      This leads to several bug reports from syzbot.
      
      I have checked other users of sock_efree(), all of them hold the
      sock refcnt.
      
      Fixes: c8c8218e ("netrom: fix a memory leak in nr_rx_frame()")
      Reported-and-tested-by: <syzbot+622bdabb128acc33427d@syzkaller.appspotmail.com>
      Reported-and-tested-by: <syzbot+6eaef7158b19e3fec3a0@syzkaller.appspotmail.com>
      Reported-and-tested-by: <syzbot+9399c158fcc09b21d0d2@syzkaller.appspotmail.com>
      Reported-and-tested-by: <syzbot+a34e5f3d0300163f0c87@syzkaller.appspotmail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4638faac