Skip to content

Commit b6139a1

Browse files
BrainSlayerpymumu
authored andcommitted
fix use after free
dns_client_exit does release the server_info members which are accessed in dns_server_exit by _dns_server_close_socket this leads to a crash at program exit or any other call of _smartdns_exiti Jan 31 08:10:11.005 dd-wrt user.emerg smartdns: process exit with signal 11, code = 1, errno = 0, pid = -1599429336, self = 7199, pc = 0x7fa132a640, addr = 0x7fa0aaa528, build(Jan 31 2026 07:01:24 arm64) Jan 31 08:10:11.006 dd-wrt user.emerg smartdns: Stack: Jan 31 08:10:11.006 dd-wrt user.emerg smartdns: #1: 0x41a650 print_stack() from /usr/sbin/smartdns+0x1a650 Jan 31 08:10:11.006 dd-wrt user.emerg smartdns: #2: 0x41a790 () from /usr/sbin/smartdns+0x1a790 Jan 31 08:10:11.006 dd-wrt user.emerg smartdns: #3: 0x7fa131a964 __setjmp() from /lib/ld-musl-aarch64.so.1+0x4a964 Jan 31 08:10:11.006 dd-wrt user.emerg smartdns: #4: 0x7fa132a640 () from /lib/ld-musl-aarch64.so.1+0x5a640 Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
1 parent 136c0c2 commit b6139a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/smartdns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,10 @@ static int _smartdns_run(void)
714714
static void _smartdns_exit(void)
715715
{
716716
_smartdns_plugin_exit();
717-
dns_client_exit();
718717
proxy_exit();
719718
fast_ping_exit();
720719
dns_server_exit();
720+
dns_client_exit();
721721
dns_stats_exit();
722722
_smartdns_destroy_ssl();
723723
dns_timer_destroy();

0 commit comments

Comments
 (0)