Lidong Chen fadc94b919 net/dns: Prevent UAF and double free
In recv_hook(), *data->addresses is freed without being set to NULL.
Since *data->addresses can be cached in dns_cache[h].addresses, this
can lead to UAF or double free if dns_cache[h].addresses is accessed
or cleared later.

The fix sets *data->addresses to NULL after freeing to avoid dangling
pointer.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2025-10-24 20:05:07 +02:00
..
2025-10-24 20:05:07 +02:00
2022-03-14 15:58:06 +01:00
2022-06-07 16:39:33 +02:00
2022-03-14 15:58:06 +01:00