lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 1 Nov 2020 21:38:45 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Paweł Jasiak <pawel@...iak.xyz>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        jack@...e.cz
Subject: Re: PROBLEM: fanotify_mark EFAULT on x86

On Sun, Nov 01, 2020 at 10:27:38PM +0100, Paweł Jasiak wrote:
> I am trying to run examples from man fanotify.7 but fanotify_mark always
> fail with errno = EFAULT.
> 
> fanotify_mark declaration is
> 
> SYSCALL_DEFINE5(fanotify_mark, int, fanotify_fd, unsigned int, flags,
> 			      __u64, mask, int, dfd,
> 			      const char  __user *, pathname)

Don't worry about that.  You aren't calling the SYSCALL, you're calling
glibc and glibc is turning it into a syscall.

extern int fanotify_mark (int __fanotify_fd, unsigned int __flags,
                          uint64_t __mask, int __dfd, const char *__pathname)

> When 
> 
> fanotify_mark(4, FAN_MARK_ADD | FAN_MARK_ONLYDIR,
>               FAN_CREATE | FAN_ONDIR, AT_FDCWD, 0xdeadc0de)

The last argument is supposed to be a pointer to a string.  I'm guessing
there's no string at 0xdeadc0de.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ