]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
copy_file_range: require CAP_SEEK capability
authorMariusz Zaborski <oshogbo@FreeBSD.org>
Thu, 28 Sep 2023 13:24:39 +0000 (15:24 +0200)
committerGordon Tetlow <gordon@FreeBSD.org>
Tue, 3 Oct 2023 21:24:41 +0000 (14:24 -0700)
commit2d23f6c33431b19d8f91ad4832db01aa25062d43
treeeece0f6ced3a8987110a998803f360e952163e95
parent7d08a7e6908b3ffb72061b7517ed29814d62355b
copy_file_range: require CAP_SEEK capability

When using copy_file_range(2) with an offset parameter,
the CAP_SEEK capability should be required.
This requirement is similar to the behavior observed with
pread(2)/pwrite(2).

Reported by: theraven
Reviewed by:    emaste, theraven, kib, markj
Approved by: so
Security: FreeBSD-SA-23:13.capsicum
Security: CVE-2023-5369
Differential Revision:  https://reviews.freebsd.org/D41967

(cherry picked from commit 15a51d3abaef27ddea66320cac7caa549738a1a6)
(cherry picked from commit 3f0ce63828dc3d4030b32ad0effb4e588af49c03)
sys/kern/vfs_syscalls.c