lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CACp1nnB_nXtxAxNzoDqcDg=FTzQbxt14SFSTqN8tAE4fn_AQyw@mail.gmail.com>
Date:   Sun, 20 Aug 2023 21:43:32 -0500
From:   Nathan French <nathanmfrench17@...il.com>
To:     linux-cifs@...r.kernel.org, linux-kernel@...r.kernel.org,
        linkinjeon@...nel.org
Subject: [PATCH][ksmbd] fix UAF in ksmbd_alloc_work_struct

    avoid oops accessing null work struct pointer

    Fixes: bdf1b0e2a1ea ("ksmbd_alloc_work_struct")
    Addresses-Coverity: 1566875 ("Explicit null dereference")
    Reviewed-by: Jackson Winslow <jackwinslow35@...il.com>
    Signed-off-by: Nathan French <nathanmfrench17@...il.com>

diff --git a/fs/smb/server/ksmbd_work.c b/fs/smb/server/ksmbd_work.c
index 51def3ca74c0..9411f7e32a3c 100644
--- a/fs/smb/server/ksmbd_work.c
+++ b/fs/smb/server/ksmbd_work.c
@@ -33,7 +33,7 @@ struct ksmbd_work *ksmbd_alloc_work_struct(void)
                                    GFP_KERNEL);
                if (!work->iov) {
                        kmem_cache_free(work_cache, work);
-                       work = NULL;
+                       return NULL;
                }
        }
        return work;

Download attachment "0001-ksmbd-fix-UAF-in-ksmbd_alloc_work_struct.patch" of type "application/octet-stream" (963 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ