-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
0a8e411 is a good work to fix CVE-2019-5736, but I get some problem with the patch on kernel 3.10.
The background is that our production online use two major kernel 3.10 and 4.9. In patch, memfd_create supported until kernel 3.17, other method use O_TMPFILE, it is supported until 3.11.
the other confused me is that with these code
/* Use our own wrapper for memfd_create. */
#if !defined(SYS_memfd_create) && defined(__NR_memfd_create)
# define SYS_memfd_create __NR_memfd_create
#endif
#ifdef SYS_memfd_create
# define HAVE_MEMFD_CREATE
/* memfd_create(2) flags -- copied from <linux/memfd.h>. */
# ifndef MFD_CLOEXEC
# define MFD_CLOEXEC 0x0001U
# define MFD_ALLOW_SEALING 0x0002U
# endif
int memfd_create(const char *name, unsigned int flags)
{
return syscall(SYS_memfd_create, name, flags);
}
#endif
even I run code on kernel 2.6, HAVE_MEMFD_CREATE always been defined, but memfd_create not work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels