]> git.ipfire.org Git - thirdparty/squid.git/commit
SNMP: Do not send responses that we fail to encode (#2151)
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 8 Sep 2025 08:05:00 +0000 (08:05 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 8 Sep 2025 08:05:07 +0000 (08:05 +0000)
commit33be856e2efdaf38a4bcb92e103f3e214c42ed57
treeefef80c56db650523e88c925c49160aac4d1eed7
parent97ddc09010276780b90d38061f68c32c59da7ade
SNMP: Do not send responses that we fail to encode (#2151)

When snmp_build() fails, its output buffer must not be used:

    Syscall param sendto() points to uninitialised byte(s)
        by xsendto() (socket.h:118)
        by comm_udp_sendto() (comm.cc:923)
        by snmpConstructReponse() (snmp_core.cc:449)

Also inform the admin about SNMP encoding failures.
src/snmp/Forwarder.cc
src/snmp/Inquirer.cc
src/snmp_core.cc