Changeset 6fdb2d1a0 in mythtv


Ignore:
Timestamp:
Nov 29, 2014, 10:53:27 PM (10 years ago)
Author:
Stuart Morgan <smorgan@…>
Branches:
fixes/0.27
Children:
70653f18a
Parents:
bd762efd16
git-author:
Stuart Morgan <smorgan@…> (11/29/14 22:53:27)
git-committer:
Stuart Morgan <smorgan@…> (11/29/14 22:54:58)
Message:

SSDP: Disable reflection attack mitigation for now, it's triggering false positives.

(cherry picked from commit 02e92a265c1e9825bb58806156fbf31bd740515a)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mythtv/libs/libmythupnp/ssdp.cpp

    rbd762efd16 r6fdb2d1a0  
    326326    // TODO: We may want to restrict this to the same subnet as the server
    327327    //       for added security
    328     if (!peerAddress.isNull() && (peerAddress != QHostAddress::Null) &&
    329         ((peerAddress.protocol() == QAbstractSocket::IPv4Protocol) &&
    330             (!peerAddress.isInSubnet(QHostAddress("172.16.0.0"), 12) &&
    331             !peerAddress.isInSubnet(QHostAddress("192.168.0.0"), 16) &&
    332             !peerAddress.isInSubnet(QHostAddress("10.0.0.0"), 8))) ||
    333         ((peerAddress.protocol() == QAbstractSocket::IPv6Protocol) &&
    334             !peerAddress.isInSubnet(pSocket->address(), 64))) // default subnet size is assumed to be /64
    335     {
    336         LOG(VB_GENERAL, LOG_CRIT, QString("SSDP Request from WAN IP "
    337                                             "address (%1). Possible SSDP "
    338                                             "Reflection attempt. Ignoring as "
    339                                             "security risk.")
    340                                                 .arg(peerAddress.toString()));
    341         pSocket->readAll(); // Discard the data in the socket buffer
    342         return;
    343     }
     328//     if (!peerAddress.isNull() && (peerAddress != QHostAddress::Null) &&
     329//         ((peerAddress.protocol() == QAbstractSocket::IPv4Protocol) &&
     330//             (!peerAddress.isInSubnet(QHostAddress("172.16.0.0"), 12) &&
     331//             !peerAddress.isInSubnet(QHostAddress("192.168.0.0"), 16) &&
     332//             !peerAddress.isInSubnet(QHostAddress("10.0.0.0"), 8))) ||
     333//         ((peerAddress.protocol() == QAbstractSocket::IPv6Protocol) &&
     334//             !peerAddress.isInSubnet(pSocket->address(), 64))) // default subnet size is assumed to be /64
     335//     {
     336//         LOG(VB_GENERAL, LOG_CRIT, QString("SSDP Request from WAN IP "
     337//                                             "address (%1). Possible SSDP "
     338//                                             "Reflection attempt. Ignoring as "
     339//                                             "security risk.")
     340//                                                 .arg(peerAddress.toString()));
     341//         pSocket->readAll(); // Discard the data in the socket buffer
     342//         return;
     343//     }
    344344
    345345    QByteArray buffer;
Note: See TracChangeset for help on using the changeset viewer.