09 Oct, 2019

1 commit

  • syzbot reported:

    BUG: memory leak
    unreferenced object 0xffff888116270800 (size 224):
    comm "syz-executor641", pid 7047, jiffies 4294947360 (age 13.860s)
    hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00 20 e1 2a 81 88 ff ff 00 40 3d 2a 81 88 ff ff . .*.....@=*....
    backtrace:
    [] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [] slab_post_alloc_hook mm/slab.h:439 [inline]
    [] slab_alloc_node mm/slab.c:3269 [inline]
    [] kmem_cache_alloc_node+0x153/0x2a0 mm/slab.c:3579
    [] __alloc_skb+0x6e/0x210 net/core/skbuff.c:198
    [] alloc_skb include/linux/skbuff.h:1058 [inline]
    [] alloc_skb_with_frags+0x5f/0x250 net/core/skbuff.c:5327
    [] sock_alloc_send_pskb+0x269/0x2a0 net/core/sock.c:2225
    [] sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2242
    [] llc_ui_sendmsg+0x10a/0x540 net/llc/af_llc.c:933
    [] sock_sendmsg_nosec net/socket.c:652 [inline]
    [] sock_sendmsg+0x54/0x70 net/socket.c:671
    [] __sys_sendto+0x148/0x1f0 net/socket.c:1964
    [...]

    The bug is that llc_sap_state_process() always takes an extra reference
    to the skb, but sometimes neither llc_sap_next_state() nor
    llc_sap_state_process() itself drops this reference.

    Fix it by changing llc_sap_next_state() to never consume a reference to
    the skb, rather than sometimes do so and sometimes not. Then remove the
    extra skb_get() and kfree_skb() from llc_sap_state_process().

    Reported-by: syzbot+6bf095f9becf5efef645@syzkaller.appspotmail.com
    Reported-by: syzbot+31c16aa4202dace3812e@syzkaller.appspotmail.com
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Eric Biggers
    Signed-off-by: Jakub Kicinski

    Eric Biggers
     

01 Apr, 2008

1 commit

  • Allocate the skb for llc responses with the received packet size by
    using the size adjustable llc_frame_alloc.
    Don't allocate useless extra payload.
    Cleanup magic numbers.

    So, this fixes oops.
    Reported by Jim Westfall:
    kernel: skb_over_panic: text:c0541fc7 len:1000 put:997 head:c166ac00 data:c166ac2f tail:0xc166b017 end:0xc166ac80 dev:eth0
    kernel: ------------[ cut here ]------------
    kernel: kernel BUG at net/core/skbuff.c:95!

    Signed-off-by: Joonwoo Park
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Joonwoo Park
     

21 Mar, 2006

1 commit


22 Sep, 2005

3 commits

  • Borrowing the structure of TCP/IP for this. On the receive of new connections I
    was bh_lock_socking the _new_ sock, not the listening one, duh, now it survives
    the ssh connections storm I've been using to test this specific bug.

    Also fixes send side skb sock accounting.

    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Signed-off-by: Jochen Friedrich
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • So as to set the newly created sk_buff ->dev member with it, that way we stop
    using dev_base->next, that is the wrong thing to do, as there may well be
    several interfaces being used with LLC. This was not such a big problem after
    all as most of the users of llc_alloc_frame were setting the correct dev, but
    this way code is reduced.

    This also fixes another bug in llc_station_ac_send_null_dsap_xid_c, that was
    not setting the skb->dev field.

    Signed-off-by: Jochen Friedrich
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds