Project

General

Profile

Bug #5872

zfs_ioc_recv, zfs_ioc_send* do not seem to check fd opening mode

Added by Andriy Gapon over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-04-25
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

It seems that zfs_ioc_recv and zfs_ioc_send and possibly other ioctl handlers do not check the fd opening mode.
For example, if a descriptor opened with O_RDONLY is passed to zfs_ioc_send, then the latter will happily write to it unless the object can not be written for other reason.
It would be nice if the mode was checked.

Also available in: Atom PDF