Bug 507866 - fanotify_mark dirfd isn't checked
Summary: fanotify_mark dirfd isn't checked
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.25 GIT
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-04 21:16 UTC by Mark Wielaard
Modified: 2025-08-31 06:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2025-08-04 21:16:56 UTC
int fanotify_mark(int fanotify_fd, unsigned int flags,
                         uint64_t mask, int dirfd,
                         const char *_Nullable pathname);

The PRE handler in coregrind/m_syswrap/syswrap-linux.c only check fd, not dirfd.
Note that:
- dirfd may be AT_FDCWD.
- if pathname is absolute, then dirfd is ignored.
Comment 1 Paul Floyd 2025-08-31 06:15:09 UTC
On 32bit platforms fanotify_fd wasn't checked either.
Comment 2 Paul Floyd 2025-08-31 06:22:13 UTC
commit 5f753c39ea6285fec27cc68cbaf6a629c5051f23 (HEAD -> master, origin/master, origin/HEAD)
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Sun Aug 31 08:21:23 2025 +0200

    Bug 507866 - fanotify_mark dirfd isn't checked