This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #15763][BZ #14752] Restrict shm_open and shm_unlink to SHMDIR.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]