CVE-2020-14323 winbind: Fix invalid lookupsids DoS
authorVolker Lendecke <vl@samba.org>
Thu, 9 Jul 2020 19:49:25 +0000 (21:49 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 29 Oct 2020 10:25:37 +0000 (10:25 +0000)
A lookupsids request without extra_data will lead to "state->domain==NULL",
which makes winbindd_lookupsids_recv trying to dereference it.

Reported by Bas Alberts of the GitHub Security Lab Team as GHSL-2020-134

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14436
Signed-off-by: Volker Lendecke <vl@samba.org>
source3/winbindd/winbindd_lookupsids.c

index d28b5fa9f0145b432ee3faad9fc7c0db72b76429..a289fd86f0f363b722e753809e08a61c2fec6447 100644 (file)
@@ -47,7 +47,7 @@ struct tevent_req *winbindd_lookupsids_send(TALLOC_CTX *mem_ctx,
        DEBUG(3, ("lookupsids\n"));
 
        if (request->extra_len == 0) {
-               tevent_req_done(req);
+               tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
                return tevent_req_post(req, ev);
        }
        if (request->extra_data.data[request->extra_len-1] != '\0') {