While reading ip_input, I noticed a good way for an attacker to remotely spam the logs for the system. The following code is the culprit:

      if (IP_LOOPBACK_ADDR(dst) ||
           IP_LOOPBACK_ADDR(ipha->ipha_src)) {
           BUMP_MIB(ill->ill_ip_mib, ipIfStatsInAddrErrors);
           cmn_err(CE_CONT, "dst %X src %X\n",
               dst, ipha->ipha_src);
           freemsg(mp);
           continue;
       }

Note that in order to do this, the attacker would have to hand-craft the ethernet frames with the loopback address as the destination. But, if he could do this, he could flood the system logs with one message per packet.

It seems that this is a bad thing. I'd like to remove the cmn_err, possibly replacing it with ip2dbg(). Thoughts?

   -- Garrett
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to