SECURITY: Check overrun rcpt_count integer
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Wed, 25 Nov 2020 21:26:53 +0000 (22:26 +0100)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Thu, 27 May 2021 19:30:36 +0000 (21:30 +0200)
commit87804cc1f325a3eb5a562b708deb0293402e1f8f
tree72bb7077bfdbc565da59f27b4fd41c0549208b18
parent40b8be2e25abb7569a05c839f5d0ab6176307a75
SECURITY: Check overrun rcpt_count integer

Credits: Qualys

    4/ In src/smtp_in.c:

    4966     case RCPT_CMD:
    4967       HAD(SCH_RCPT);
    4968       rcpt_count++;
    ....
    5123       if (rcpt_count > recipients_max && recipients_max > 0)

    In theory this recipients_max check can be bypassed, because the int
    rcpt_count can overflow (become negative). In practice this would either
    consume too much memory or generate too much network traffic, but maybe
    it should be fixed anyway.

(cherry picked from commit 04139ca809fbe56d8fe9c55a77640ea9fa93b8f1)
(cherry picked from commit db96ca55137d7684a9afdf9d118feed9116906b7)
src/src/smtp_in.c