]> git.ipfire.org Git - thirdparty/bind9.git/commit
fix: usr: Stop rndc-confgen from following symlinks when writing the keyfile
authorOndřej Surý <ondrej@isc.org>
Wed, 29 Apr 2026 14:56:37 +0000 (16:56 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 29 Apr 2026 14:56:37 +0000 (16:56 +0200)
commit468b09feb2d9600e3bdf7d81817f8b9adc5a9d54
treedbbf7905befb60811f5b7855edf239233f847d9c
parent5b164b551fa5714f3b324737e7d549c98bfb34b6
parent6082274450ff34d0ce7c16928d059da6f5093d6b
fix: usr: Stop rndc-confgen from following symlinks when writing the keyfile

When rndc-confgen -a (re)created the rndc control key, it followed a
symbolic link if one happened to exist at the keyfile path: the
existence check looked through the link, then the file was truncated,
its ownership changed, and the key contents written into whatever file
the link pointed at. rndc-confgen now refuses to follow symbolic links
at the keyfile path and fails with an error instead, so the wrong file
can no longer be overwritten by accident.

Merge branch '5901-rndc-confgen-symlink-attack' into 'main'

See merge request isc-projects/bind9!11902