Bug 1550066

Summary: memcached bind to all interfaces by default
Product: Red Hat Enterprise Linux 7 Reporter: Andrey Bondarenko <abondare>
Component: memcachedAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: medium    
Version: 7.4CC: cperry, jonthompson, matthew.taylor, ondrejj, rschiron, thoger, thozza, yozone
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-06 15:37:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrey Bondarenko 2018-02-28 12:42:48 UTC
Description of problem:

memecached bind to all interfaces by default that makes weak default config. If user for any reason shuts down the firewall

 - one can send random commands to the memcached, like flush noreply
 - it can be used as DDOS amplification node, see


https://medium.com/@qratorlabs/the-memcached-amplification-attack-reaching-500-gbps-b439a7b83c98
https://www.arbornetworks.com/blog/asert/memcached-reflection-amplification-description-ddos-attack-mitigation-recommendations/
https://www.bleepingcomputer.com/news/security/memcache-servers-can-be-abused-for-insanely-massive-ddos-attacks/

Version-Release number of selected component (if applicable):


How reproducible:

1 install memecached
2
 cat /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""



Actual results:
OPTIONS=""

Expected results:
 OPTIONS="-l 127.0.0.1,::1"

Additional info:
It's correct in Fedora

Comment 2 Miroslav Lichvar 2018-02-28 13:22:40 UTC
*** Bug 1549752 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Lichvar 2018-02-28 13:31:04 UTC
The trouble with changing the default config to listen only on the loopback interface is that it will break the service for users who need remote access and have not changed their config.

Also, changing the default config will not work for users who have modified the file, but still allow remote access even when they don't need it.

The security team will need to consider the change.

Comment 4 Miroslav Lichvar 2018-03-01 09:16:12 UTC
FWIW, in the latest upstream code the UDP port is disabled by default.

https://github.com/memcached/memcached/commit/dbb7a8af90054bf4ef51f5814ef7ceb17d83d974

Comment 6 Clifford Perry 2018-03-01 17:34:05 UTC
As a side note, we have proposed an additional section in the RHEL Security Guide for future inclusion. This is tracked within https://bugzilla.redhat.com/show_bug.cgi?id=1550654   

Cliff.

Comment 9 Riccardo Schirone 2018-03-02 13:33:02 UTC
memcached 1.5.6 release notes:
https://github.com/memcached/memcached/wiki/ReleaseNotes156

Comment 11 Red Hat Bugzilla Rules Engine 2018-11-06 15:37:16 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.