criu/criu
3idey 12792bfca7
fsnotify: Check mntns_get_root_by_mnt_id() return value in get_mark_path()
Add checks for mntns_get_root_by_mnt_id() return value before using it
in openat() calls. This prevents using an invalid file descriptor if
the mount namespace root lookup fails.

Add error logging when mntns_get_root_by_mnt_id() fails to provide
diagnostic context about which mount namespace and path were being
accessed.

Also rename local variable 'path' to 'fpath' to avoid shadowing the
outer scope variable of the same name.

Signed-off-by: 3idey <elaidya225@gmail.com>
2026-07-21 13:40:18 +02:00
..
arch infect-types: fix user_gcs redefine error 2026-07-21 13:40:17 +02:00
include criu: Support binfmt_misc sandboxing 2026-07-21 13:40:17 +02:00
pie restore/pie: check return value of sys_rseq on unregister 2026-07-21 13:40:17 +02:00
unittest criu: use libuuid for criu_run_id generation 2025-03-21 12:40:31 -07:00
action-scripts.c rpc: Support gathering external file list after freezing process tree. 2023-10-22 13:29:25 -07:00
aio.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
apparmor.c apparmor: get_suspend_policy must return NULL in error cases 2024-09-11 16:02:11 -07:00
autofs.c criu: use proper format-specified to accommodate time_t 64-bit change 2024-09-11 16:02:11 -07:00
bfd.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
bitmap.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
bpfmap.c bpf: update deprecated API 2022-04-28 17:53:52 -07:00
cgroup-props.c cgroup-v2: Checkpoint and restore some global properties 2023-04-15 21:17:21 -07:00
cgroup.c cgroup: fix stack buffer overflow in ctrl_dir_and_opt() 2026-07-19 20:28:42 +02:00
clone-noasan.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
config.c config: avoid NULL dereference on network-lock in RPC config parsing 2026-07-20 11:23:01 +02:00
cr-check.c criu: kerndat: add kerndat_has_binfmt_misc_sandboxing() 2026-07-21 13:40:17 +02:00
cr-dedup.c pagemap: print page regions in the format start - end 2025-11-02 07:48:23 -08:00
cr-dump.c criu: Support binfmt_misc sandboxing 2026-07-21 13:40:17 +02:00
cr-errno.c
cr-restore.c criu: Support binfmt_misc sandboxing 2026-07-21 13:40:17 +02:00
cr-service.c service: restrict socket permissions to 0600 2026-07-19 19:52:27 +02:00
crtools.c doc: update pipe/socket examples for --inherit-fd 2026-07-21 13:40:16 +02:00
eventfd.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
eventpoll.c Fix some codespell warnings 2022-04-28 17:53:52 -07:00
external.c configs: fix used after free cases 2021-09-03 10:31:00 -07:00
fault-injection.c seize: enable support for frozen containers 2025-03-21 12:40:31 -07:00
fdstore.c criu: use libuuid for criu_run_id generation 2025-03-21 12:40:31 -07:00
fifo.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
file-ids.c criu/files: Don't cache fd ids for device files 2022-04-28 17:53:52 -07:00
file-lock.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
files-ext.c files-ext: Allow plugin files to retry 2026-07-21 13:40:16 +02:00
files-reg.c files-reg: fix buffer overflow on aarch64 2025-03-21 12:40:31 -07:00
files.c files: fork helpers without CLONE_FILES | CLONE_FS 2025-11-02 07:48:23 -08:00
filesystems.c criu: Support binfmt_misc sandboxing 2026-07-21 13:40:17 +02:00
fsnotify.c fsnotify: Check mntns_get_root_by_mnt_id() return value in get_mark_path() 2026-07-21 13:40:18 +02:00
hugetlb.c hugetlb: don't dump anonymous private hugetlb mapping using memfd approach 2023-04-15 21:17:21 -07:00
image-desc.c criu: Remove legacy binfmt_misc handling code 2026-07-21 13:40:17 +02:00
image.c cr-service: refactor images/workdir setup 2025-11-05 15:41:34 -08:00
img-streamer.c action-scripts: Add pre-stream hook 2023-10-22 13:29:25 -07:00
ipc_ns.c ipc_sysctl: Prioritize restoring IPC variables using non usernsd approach 2023-04-15 21:17:21 -07:00
irmap.c irmap: duplicate string in irmap_scan_path_add 2024-09-11 16:02:11 -07:00
kcmp-ids.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
kerndat.c criu: kerndat: add kerndat_has_binfmt_misc_sandboxing() 2026-07-21 13:40:17 +02:00
libnetlink.c build: libnfnetlink: Remove nla_get_s32(). 2023-10-22 13:29:25 -07:00
log.c log: use sizeof(*hdr) instead of sizeof(hdr) 2025-11-13 08:40:46 -08:00
lsm.c lsm: use attr/apparmor/current to get apparmor label 2025-11-02 07:48:23 -08:00
Makefile make: remove checks for python 2 binary 2023-10-22 13:29:25 -07:00
Makefile.crtools criu: Support C/R of pidfds 2025-03-21 12:40:31 -07:00
Makefile.packages criu: use libuuid for criu_run_id generation 2025-03-21 12:40:31 -07:00
mem.c restorer: shstk: allocate restorer shadow stack 2025-11-05 15:41:34 -08:00
memfd.c memfd: don't reopen file descriptors for memory mappings 2023-10-22 13:29:25 -07:00
mount-v2.c criu: Remove legacy binfmt_misc handling code 2026-07-21 13:40:17 +02:00
mount.c criu: Remove legacy binfmt_misc handling code 2026-07-21 13:40:17 +02:00
namespaces.c criu: Support binfmt_misc sandboxing 2026-07-21 13:40:17 +02:00
net.c net: Route veth restore through usernsd for userns mode 2026-07-19 19:52:27 +02:00
netfilter.c net: remember the name of the lock chain (nftables) 2025-03-21 12:40:31 -07:00
page-pipe.c pagemap: print page regions in the format start - end 2025-11-02 07:48:23 -08:00
page-xfer.c page-xfer: Fix page_read resource leak in page_pipe_from_pagemap() 2026-07-21 13:40:17 +02:00
pagemap-cache.c pagemap-cache: stop filling cache on VMA_AREA_GUARD 2026-07-20 11:23:01 +02:00
pagemap.c page-xfer: fix incompatible pointer type on armv7 2025-11-02 07:48:24 -08:00
parasite-syscall.c compel: avoid rseq critical sections when executing parasite code 2026-07-20 11:23:01 +02:00
path.c Fix some codespell warnings 2022-04-28 17:53:52 -07:00
pidfd-store.c criu: use libuuid for criu_run_id generation 2025-03-21 12:40:31 -07:00
pidfd.c pidfd: add missing include 2025-03-21 12:40:31 -07:00
pie-util-vdso-elf32.c vdso: fill compat symtab in CRIU 2017-03-15 00:09:52 +03:00
pie-util-vdso.c
pie-util.c
pipes.c pipes: Plug pipe fd leak in "Unable to set a pipe size" error case. 2023-10-22 13:29:25 -07:00
plugin.c plugin: Add DUMP_DEVICES_LATE callback 2026-07-21 13:40:16 +02:00
proc_parse.c limit the field width of 'scanf' 2026-07-21 13:40:16 +02:00
protobuf-desc.c criu: Support C/R of pidfds 2025-03-21 12:40:31 -07:00
protobuf.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
pstree.c files: fork helpers without CLONE_FILES | CLONE_FS 2025-11-02 07:48:23 -08:00
rbtree.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
rst-malloc.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
seccomp.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
seize.c pstree: Add has_children function 2025-11-02 07:48:22 -08:00
servicefd.c plugin/amdgpu: Add handling for amdgpu drm buffer objects 2026-07-21 13:40:16 +02:00
setproctitle.c string: define wrapers __setproctitle and __setproctitle_init to hide bsd headers 2023-04-15 21:17:21 -07:00
shmem.c criu/mem: refactor should_dump_page helper 2025-11-02 07:48:23 -08:00
sigact.c criu: move sigact dump/restore code into sigact.c 2024-09-11 16:02:11 -07:00
sigframe.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
signalfd.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
sk-inet.c criu/sockets: Restrict SO_PASSCRED and SO_PASSSEC to supported families 2025-11-02 07:48:23 -08:00
sk-netlink.c criu/sockets: Restrict SO_PASSCRED and SO_PASSSEC to supported families 2025-11-02 07:48:23 -08:00
sk-packet.c criu/sockets: Restrict SO_PASSCRED and SO_PASSSEC to supported families 2025-11-02 07:48:23 -08:00
sk-queue.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
sk-tcp.c sk-tcp: Move TCP socket options from SkOptsEntry to TcpOptsEntry 2024-09-11 16:02:11 -07:00
sk-unix.c sk-unix: fix mutex_ghost deadlock on connect failure in post_open_standalone 2026-07-21 13:40:17 +02:00
sockets.c sockets: Treat UDPLITE as optional in collect_err() 2026-07-19 19:52:27 +02:00
stats.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
string.c string: use our own __strlcpy and __strlcat to remove bsd headers 2023-04-15 21:17:21 -07:00
sysctl.c ipc_sysctl: Prioritize restoring IPC variables using non usernsd approach 2023-04-15 21:17:21 -07:00
sysfs_parse.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
timens.c criu: use proper format-specified to accommodate time_t 64-bit change 2024-09-11 16:02:11 -07:00
timer.c restore: use the new kernel interface to restore timers 2025-11-02 07:42:55 -08:00
timerfd.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
tls.c Fix some codespell warnings 2022-04-28 17:53:52 -07:00
tty.c tty: fix compiler error 2026-07-19 19:08:59 +02:00
tun.c tun: don't parse buffers that have not been filled with data 2023-10-22 13:29:25 -07:00
uffd.c pagemap: use unsigned long for page counts 2025-11-02 07:48:23 -08:00
util.c util: Make close_safe() reset fd to -1 even on close() failure 2026-07-21 13:40:17 +02:00
uts_ns.c
vdso-compat.c Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
vdso.c criu/{mem, vdso, cr-restore}: introduce VMA_AREA_GUARD fake VMAs 2025-11-02 07:48:23 -08:00