]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/dns: fix use-after-free oom case
authorShachar Sharon <ssharon@redhat.com>
Thu, 30 Apr 2026 11:11:49 +0000 (14:11 +0300)
committerAnoop C S <anoopcs@samba.org>
Sat, 2 May 2026 14:51:58 +0000 (14:51 +0000)
A failure to tevent_wakeup_recv(subreq) should trigger oom call on 'req'
(instead on 'subreq', which has already been free).

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Sat May  2 14:51:58 UTC 2026 on atb-devel-224

libcli/dns/dns.c

index 2482e1353e7a8e7cdb8b486194c3482e871ca874..782fdd0d730db9ae18b9cdbcc39cab2724750277 100644 (file)
@@ -574,7 +574,7 @@ static void dns_cli_request_trigger_tcp(struct tevent_req *subreq)
        ok = tevent_wakeup_recv(subreq);
        TALLOC_FREE(subreq);
        if (!ok) {
-               tevent_req_oom(subreq);
+               tevent_req_oom(req);
                return;
        }