Page MenuHomeFreeBSD

linkat(2): check NIRES_EMPTYPATH on the first fd arg
ClosedPublic

Authored by kib on Apr 19 2021, 1:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 17, 12:10 AM
Unknown Object (File)
Wed, Apr 16, 2:12 AM
Unknown Object (File)
Fri, Apr 11, 6:02 PM
Unknown Object (File)
Mar 14 2025, 7:24 AM
Unknown Object (File)
Feb 28 2025, 9:42 AM
Unknown Object (File)
Feb 28 2025, 9:15 AM
Unknown Object (File)
Feb 28 2025, 8:59 AM
Unknown Object (File)
Feb 28 2025, 4:20 AM
Subscribers
None

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Apr 19 2021, 1:38 PM
kib created this revision.
sys/kern/vfs_syscalls.c
1581

How can it be null? kern_linkat_vp() dereferences nd.ni_vp unconditionally.

This revision is now accepted and ready to land.Apr 19 2021, 1:51 PM
kib marked an inline comment as done.Apr 19 2021, 3:02 PM
kib added inline comments.
sys/kern/vfs_syscalls.c
1581

Yes, LOOKUP only returns success when there is something to lookup.

kib marked an inline comment as done.

Remove ni_vp != NULL check.

This revision now requires review to proceed.Apr 19 2021, 3:03 PM
This revision is now accepted and ready to land.Apr 19 2021, 3:04 PM