mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-23 02:32:44 +00:00
This patch consolidates the repetitive error handling across the RPC functions, which take node handles or directory handles as arguments. During this change, I noticed that directory handles - which are values provided by the client - were not checked for their type before being used. A misbehaving client may open a file, manually construct a directory handle using the number of the file handle, and invoke a directory operation at lx_fs, which would then wrongly access a file node as directory node. This patch solves this issue by introducing two distinct methods _with_open_node and _with_open_dir_node, which perform the respective safety checks. Fixes #4608
This source-code repository contains genuine low-level OS components and interfaces of Genode. It solely depends on the framework's base API.