This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #15763][BZ #14752] Restrict shm_open and shm_unlink to SHMDIR.
- From: Florian Weimer <fweimer at redhat dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>, libc-alpha at sourceware dot org
- Date: Mon, 21 Oct 2013 12:01:27 +0200
- Subject: Re: [PATCH][BZ #15763][BZ #14752] Restrict shm_open and shm_unlink to SHMDIR.
- Authentication-results: sourceware.org; auth=none
- References: <20131015073738 dot GA32465 at domone dot podge>
On 10/15/2013 09:37 AM, OndÅej BÃlka wrote:
Hi, this patch adds validation restrict shm_open into a SHMDIR
directory.
A manpage says that it is only recomanded for portability, it is ok to
break nonportable apps? If not then close 15763.
As nobody bothered to test posix shmopen implementations I will not add
validation until its fixed.
OK to commit?
Looks okay to me in principle.
+ if (name[0] == '\0' || namelen > NAME_MAX || strchr (name, '/'))
I think most of libc uses explicit checks: strchr (name, '/') != NULL.
+ if (name[0] == '\0' || namelen > NAME_MAX || strchr (name, '/'))
Likewise.
--
Florian Weimer / Red Hat Product Security Team