1. 27 9月, 2018 2 次提交
  2. 20 9月, 2018 2 次提交
    • A
      floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl · 65eea8ed
      Andy Whitcroft 提交于
      The final field of a floppy_struct is the field "name", which is a pointer
      to a string in kernel memory.  The kernel pointer should not be copied to
      user memory.  The FDGETPRM ioctl copies a floppy_struct to user memory,
      including this "name" field.  This pointer cannot be used by the user
      and it will leak a kernel address to user-space, which will reveal the
      location of kernel code and data and undermine KASLR protection.
      
      Model this code after the compat ioctl which copies the returned data
      to a previously cleared temporary structure on the stack (excluding the
      name pointer) and copy out to userspace from there.  As we already have
      an inparam union with an appropriate member and that memory is already
      cleared even for read only calls make use of that as a temporary store.
      
      Based on an initial patch by Brian Belleville.
      
      CVE-2018-7755
      Signed-off-by: NAndy Whitcroft <apw@canonical.com>
      
      Broke up long line.
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      65eea8ed
    • J
      libata: mask swap internal and hardware tag · 7ce5c8cd
      Jens Axboe 提交于
      hen we're comparing the hardware completion mask passed in from the
      driver with the internal tag pending mask, we need to account for the
      fact that the internal tag is different from the hardware tag. If not,
      then we can end up either prematurely completing the internal tag (since
      it's not set in the hw mask), or simply flag an error:
      
      ata2: illegal qc_active transition (100000000->00000001)
      
      If the internal tag is set, then swap that with the hardware tag in this
      case before comparing with what the hardware reports.
      
      Fixes: 28361c40 ("libata: add extra internal command")
      Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=201151
      Cc: stable@vger.kernel.org
      Reported-by: NPaul Sbarra <sbarra.paul@gmail.com>
      Tested-by: NPaul Sbarra <sbarra.paul@gmail.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      7ce5c8cd
  3. 17 9月, 2018 1 次提交
  4. 13 9月, 2018 1 次提交
    • J
      null_blk: fix zoned support for non-rq based operation · b228ba1c
      Jens Axboe 提交于
      The supported added for zones in null_blk seem to assume that only rq
      based operation is possible. But this depends on the queue_mode setting,
      if this is set to 0, then cmd->bio is what we need to be operating on.
      Right now any attempt to load null_blk with queue_mode=0 will
      insta-crash, since cmd->rq is NULL and null_handle_cmd() assumes it to
      always be set.
      
      Make the zoned code deal with bio's instead, or pass in the
      appropriate sector/nr_sectors instead.
      
      Fixes: ca4b2a01 ("null_blk: add zone support")
      Tested-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      b228ba1c
  5. 06 9月, 2018 1 次提交
    • S
      nvmet-rdma: fix possible bogus dereference under heavy load · 8407879c
      Sagi Grimberg 提交于
      Currently we always repost the recv buffer before we send a response
      capsule back to the host. Since ordering is not guaranteed for send
      and recv completions, it is posible that we will receive a new request
      from the host before we got a send completion for the response capsule.
      
      Today, we pre-allocate 2x rsps the length of the queue, but in reality,
      under heavy load there is nothing that is really preventing the gap to
      expand until we exhaust all our rsps.
      
      To fix this, if we don't have any pre-allocated rsps left, we dynamically
      allocate a rsp and make sure to free it when we are done. If under memory
      pressure we fail to allocate a rsp, we silently drop the command and
      wait for the host to retry.
      Reported-by: NSteve Wise <swise@opengridcomputing.com>
      Tested-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      [hch: dropped a superflous assignment]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      8407879c
  6. 05 9月, 2018 1 次提交
  7. 29 8月, 2018 1 次提交
  8. 28 8月, 2018 9 次提交
  9. 24 8月, 2018 9 次提交
  10. 23 8月, 2018 10 次提交
  11. 22 8月, 2018 3 次提交