]> git.ipfire.org Git - thirdparty/bind9.git/commit
DoH: avoid potential use after free for HTTP/2 session objects
authorArtem Boldariev <artem@boldariev.com>
Fri, 8 Dec 2023 12:26:46 +0000 (14:26 +0200)
committerNicki Křížek <nicki@isc.org>
Mon, 10 Jun 2024 16:35:16 +0000 (18:35 +0200)
commitb601a5b7818f6ccc44ed3c89b645686fc91c08d1
tree6c3454d5881242b8bbcc83aeb91aa373dbf92659
parent3be849bfab6045dfb878d29730b48d1a75270b4e
DoH: avoid potential use after free for HTTP/2 session objects

It was reported that HTTP/2 session might get closed or even deleted
before all async. processing has been completed.

This commit addresses that: now we are avoiding using the object when
we do not need it or specifically check if the pointers used are not
'NULL' and by ensuring that there is at least one reference to the
session object while we are doing incoming data processing.

This commit makes the code more resilient to such issues in the
future.

(cherry picked from commit 0cca550dff403c6100b7c0da8f252e7967765ba7)
lib/isc/netmgr/http.c