1. 17 Jan, 2019 1 commit
    • Colin Ian King's avatar
      cifs: fix memory leak of an allocated cifs_ntsd structure · cb891e7a
      Colin Ian King authored
      The call to SMB2_queary_acl can allocate memory to pntsd and also
      return a failure via a call to SMB2_query_acl (and then query_info).
      This occurs when query_info allocates the structure and then in
      query_info the call to smb2_validate_and_copy_iov fails. Currently the
      failure just returns without kfree'ing pntsd hence causing a memory
      leak.
      
      Currently, *data is allocated if it's not already pointing to a buffer,
      so it needs to be kfree'd only if was allocated in query_info, so the
      fix adds an allocated flag to track this.  Also set *dlen to zero on
      an error just to be safe since *data is kfree'd.
      
      Also set errno to -ENOMEM if the allocation of *data fails.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      Reviewed-by: default avatarDan Carpener <dan.carpenter@oracle.com>
      cb891e7a
  2. 11 Jan, 2019 8 commits
  3. 10 Jan, 2019 5 commits
  4. 04 Jan, 2019 1 commit
  5. 03 Jan, 2019 3 commits
  6. 31 Dec, 2018 2 commits
  7. 28 Dec, 2018 17 commits
  8. 24 Dec, 2018 3 commits