Disable kpasswdd error replies to completely malformed requests
commit3f309551f15800959c6937a3e63db63554d3baa8
authorRuss Allbery <rra@stanford.edu>
Wed, 10 Feb 2010 19:11:42 +0000 (10 11:11 -0800)
committerLove Hornquist Astrand <lha@h5l.org>
Tue, 16 Mar 2010 19:20:29 +0000 (16 12:20 -0700)
tree7baca2610b5513b5a900adfbf0a4a80c0410b881
parente1712f7c0e68522582fd677de34c6475d74649ed
Disable kpasswdd error replies to completely malformed requests

Only send an error reply if the request passes basic verification.
Otherwise, kpasswdd would reply to every UDP packet, allowing an
attacker to set up a ping-pong DoS attack via a spoofed UDP packet with
a source address of another UDP service that also replies to every
packet.

Also suppress the error reply if ap_req_len is 0, since this indicates
an error packet.  An error packet may be the result of a ping-pong
attacker pointing us at another kpasswdd.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
kpasswd/kpasswdd.c