If any ucd-snmp version, 4.2.6 and below, is installed setuid root, a local attacker can overwrite any file using the -P and -l parameters.
You can download this advisory from the following link: https://packetstormsecurity.com/files/download/33480/snmpfile.txt
Source: https://packetstormsecurity.com/files/33480/snmpfile.txt.html