1. 22 Apr, 2014 37 commits
  2. 17 Apr, 2014 1 commit
  3. 16 Apr, 2014 2 commits
    • Kees Cook's avatar
      seccomp: fix memory leak on filter attach · 0acf07d2
      Kees Cook authored
      This sets the correct error code when final filter memory is unavailable,
      and frees the raw filter no matter what.
      
      unreferenced object 0xffff8800d6ea4000 (size 512):
        comm "sshd", pid 278, jiffies 4294898315 (age 46.653s)
        hex dump (first 32 bytes):
          21 00 00 00 04 00 00 00 15 00 01 00 3e 00 00 c0  !...........>...
          06 00 00 00 00 00 00 00 21 00 00 00 00 00 00 00  ........!.......
        backtrace:
          [<ffffffff8151414e>] kmemleak_alloc+0x4e/0xb0
          [<ffffffff811a3a40>] __kmalloc+0x280/0x320
          [<ffffffff8110842e>] prctl_set_seccomp+0x11e/0x3b0
          [<ffffffff8107bb6b>] SyS_prctl+0x3bb/0x4a0
          [<ffffffff8152ef2d>] system_call_fastpath+0x1a/0x1f
          [<ffffffffffffffff>] 0xffffffffffffffff
      Reported-by: default avatarMasami Ichikawa <masami256@gmail.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Tested-by: default avatarMasami Ichikawa <masami256@gmail.com>
      Acked-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0acf07d2
    • Dan Carpenter's avatar
      isdn: icn: buffer overflow in icn_command() · b7a31405
      Dan Carpenter authored
      This buffer over was detected using static analysis:
      
      	drivers/isdn/icn/icn.c:1325 icn_command()
      	error: format string overflow. buf_size: 60 length: 98
      
      The calculation for the length of the string is off because it assumes
      that the dial[] buffer holds a 50 character string, but actually it is
      at most 31 characters and NUL.  I have removed the dial[] buffer because
      it isn't needed.
      
      The maximum length of the string is actually 79 characters and a NUL.  I
      have made the cbuf[] array large enough to hold it and changed the
      sprintf() to an snprintf() as a further safety enhancement.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b7a31405