Hello,
Since I upgraded to 3.2.2-cznic.1~bullseye, my scripts using knsupdate
fails, on every machine they run on.
I can reproduce this with gdb, here is the trace I get in this case :
Starting program: /usr/bin/knsupdate -k
/etc/letsencrypt.sh/hooks/tsig.key /tmp/tmp.17EBRdeI8j
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x000055555556161c in net_send (net=net@entry=0x7ffffffcbb80,
buf=0x555555592a10 "\345\327(", buf_len=196)
at utils/common/netio.c:587
587 utils/common/netio.c: No such file or directory.
(gdb) where
#0 0x000055555556161c in net_send (net=net@entry=0x7ffffffcbb80,
buf=0x555555592a10 "\345\327(", buf_len=196)
at utils/common/netio.c:587
#1 0x000055555555adee in pkt_sendrecv
(params=params@entry=0x7ffffffcbdd0) at utils/knsupdate/knsupdate_exec.c:456
#2 0x000055555555ba01 in cmd_send (lp=<optimized out>,
params=0x7ffffffcbdd0)
at utils/knsupdate/knsupdate_exec.c:851
#3 0x000055555555b3e6 in knsupdate_process_line
(line=line@entry=0x5555555755e0 "send",
params=params@entry=0x7ffffffcbdd0) at
utils/knsupdate/knsupdate_exec.c:498
#4 0x000055555555b5ed in knsupdate_process_line (params=0x7ffffffcbdd0,
line=0x5555555755e0 "send")
at utils/knsupdate/knsupdate_exec.c:486
#5 process_lines (params=params@entry=0x7ffffffcbdd0,
input=input@entry=0x5555555910f0)
at utils/knsupdate/knsupdate_exec.c:527
#6 0x000055555555bd3e in knsupdate_exec
(params=params@entry=0x7ffffffcbdd0)
at utils/knsupdate/knsupdate_exec.c:575
#7 0x0000555555559dc9 in main (argc=<optimized out>,
argv=0x7fffffffe548) at utils/knsupdate/knsupdate_main.c:35
The nsupdate script (/tmp/tmp.17EBRdeI8j) is here (with truncated TXT) :
server 10.42.42.21
zone durel.eu.
origin durel.eu.
ttl 600
add _acme-challenge.ns.durel.eu. 600 in TXT "qLH_KkbQ_IUVr[...]7rs-iUE"
send
quit
As I can reproduce this with any tsig key, I can provide a core if you
need it.
--
Bastien Durel
Core was generated by `/usr/bin/knsupdate -k /tmp/tsig.key /tmp/tmp.17EBRdeI8j'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000055555556161c in net_send (net=net@entry=0x7ffffffcbba0,
buf=0x555555592a10 "f\364(", buf_len=196) at utils/common/netio.c:587
587 utils/common/netio.c: No such file or directory.
(gdb) bt full
#0 0x000055555556161c in net_send (net=net@entry=0x7ffffffcbba0,
buf=0x555555592a10 "f\364(", buf_len=196) at utils/common/netio.c:587
proxy_buf =
"\000\000\000\000\000U\000\000\000\037\363\f\245(\253i\000\b\000\000\000\000\000\000\240\273\374\377\377\177\000\000\002\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000p\275\374\377"
iov = {{iov_base = 0x0, iov_len = 0}, {iov_base = 0x555555592a10,
iov_len = 196}}
msg = {msg_name = 0x0, msg_namelen = 0, msg_iov = 0x0, msg_iovlen = 0,
msg_control = 0x0, msg_controllen = 0, msg_flags = 0}
total = <optimized out>
__func__ = "net_send"
#1 0x000055555555adee in pkt_sendrecv (params=params@entry=0x7ffffffcbdf0) at
utils/knsupdate/knsupdate_exec.c:456
net = {sockfd = 4, iptype = 0, socktype = 2, wait = 3, flags =
NET_FLAGS_NONE, local = 0x0, remote = 0x5555555915a0, local_str = 0x0,
remote_str = 0x555555575d60 "10.42.42.21@53(UDP)", remote_info = 0x555555591880,
srv = 0x555555591880, local_info = 0x0, tls = {wait = 0, sockfd = 0,
params = 0x0, session = 0x0, credentials = 0x0}, https = {params = {enable =
false, method = POST, path = 0x0}, session = 0x0, tls = 0x0, authority = 0x0,
path = 0x0, send_buf = 0x0, send_buflen = 0, recv_buf = 0x0,
recv_buflen = 0, status = 0, recv_mx = pthread_mutex_t = {Type = Normal, Status
= Not acquired, Robust = No, Shared = No, Protocol = None}, stream = 0}, proxy
= {
src = 0x0, dst = 0x0}}
ret = 0
__func__ = "pkt_sendrecv"
rb = <optimized out>
#2 0x000055555555ba01 in cmd_send (lp=<optimized out>, params=0x7ffffffcbdf0)
at utils/knsupdate/knsupdate_exec.c:851
__func__ = "cmd_send"
ret = 0
sign_ctx = {digest_size = 48, digest = 0x555555591770
"-g\324\337t>a\b\302M[\341c\346鰋", <incomplete sequence \317>, tsig_key =
0x7fffffffe3d8}
rb = <optimized out>
tries = 4
#3 0x000055555555b3e6 in knsupdate_process_line
(line=line@entry=0x5555555755e0 "send", params=params@entry=0x7ffffffcbdf0) at
utils/knsupdate/knsupdate_exec.c:498
ret = 17
cmd = 0x55555556b1a9 "\004send"
val = <optimized out>
#4 0x000055555555b5ed in knsupdate_process_line (params=0x7ffffffcbdf0,
line=0x5555555755e0 "send") at utils/knsupdate/knsupdate_exec.c:486
ret = <optimized out>
cmd = <optimized out>
val = <optimized out>
ret = <optimized out>
cmd = <optimized out>
val = <optimized out>
#5 process_lines (params=params@entry=0x7ffffffcbdf0,
input=input@entry=0x5555555910f0) at utils/knsupdate/knsupdate_exec.c:527
line = 0x5555555755e0 "send"
buf = 0x555555591300 "send\n"
buflen = 120
ret = 0
#6 0x000055555555bd3e in knsupdate_exec (params=params@entry=0x7ffffffcbdf0)
at utils/knsupdate/knsupdate_exec.c:575
filename = 0x7fffffffe7e6 "/tmp/tmp.17EBRdeI8j"
fp = 0x5555555910f0
ret = 0
n = 0x7ffff7fca3d8
#7 0x0000555555559dc9 in main (argc=<optimized out>, argv=0x7fffffffe568) at
utils/knsupdate/knsupdate_main.c:35
ret = 0
params = <error reading variable params (value of type
`knsupdate_params_t' requires 206432 bytes, which is more than max-value-size)>
--