RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 883438 - Memcached init script allows it to be started by an unprivileged user
Summary: Memcached init script allows it to be started by an unprivileged user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: memcached
Version: 6.3
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Miroslav Lichvar
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 1367048 (view as bug list)
Depends On:
Blocks: 1373253
TreeView+ depends on / blocked
 
Reported: 2012-12-04 15:46 UTC by Stijn Tintel
Modified: 2017-03-21 09:23 UTC (History)
3 users (show)

Fixed In Version: memcached-1.4.4-4.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 09:23:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0595 0 normal SHIPPED_LIVE memcached bug fix update 2017-03-21 12:25:45 UTC

Description Stijn Tintel 2012-12-04 15:46:01 UTC
Description of problem:
Memcached init script allows it to be started by an unprivileged user.

Version-Release number of selected component (if applicable):
memcached-1.4.4-3.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. sudo yum -y install memcached
2. /etc/init.d/memcached start (as unprivileged user)
  
Actual results:
[stintel@kato ~]$ /etc/init.d/memcached start 
Starting memcached:                                        [  OK  ]
touch: cannot touch `/var/lock/subsys/memcached': Permission denied
[stintel@kato ~]$ ps aux | grep memc
root       968  0.0  0.0      0     0 ?        S    Nov19  20:05 [vmmemctl]
stintel  13101  0.0  0.0 328732  1000 ?        Ssl  16:40   0:00 memcached -d -p 11211 -u memcached -m 64 -c 1024 -P /var/run/memcached/memcached.pid
stintel  13117  0.0  0.0 103244   852 pts/0    S+   16:41   0:00 grep memc


Expected results:
Memcached should not be started and the init script should not show OK.

Comment 2 Miroslav Lichvar 2012-12-04 16:51:58 UTC
Adding "[ "$EUID" != "0" ] && exit 4" to start() in the init script should fix it. The memcached daemon itself doesn't need any special privileges, any user can run it.

Comment 3 RHEL Program Management 2013-10-14 00:12:08 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 6 Miroslav Lichvar 2016-09-07 14:28:07 UTC
*** Bug 1367048 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2017-03-21 09:23:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0595.html


Note You need to log in before you can comment on or make changes to this bug.