diff options
| author | Baokun Li <libaokun1@huawei.com> | 2024-05-22 19:43:02 +0800 | 
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2024-05-29 13:03:30 +0200 | 
| commit | a26dc49df37e996876f50a0210039b2d211fdd6f (patch) | |
| tree | 3694199b7034232b83d56cb649a82e55759576f4 /net/lapb/lapb_iface.c | |
| parent | 3e6d704f02aa4c50c7bc5fe91a4401df249a137b (diff) | |
cachefiles: add consistency check for copen/cread
This prevents malicious processes from completing random copen/cread
requests and crashing the system. Added checks are listed below:
  * Generic, copen can only complete open requests, and cread can only
    complete read requests.
  * For copen, ondemand_id must not be 0, because this indicates that the
    request has not been read by the daemon.
  * For cread, the object corresponding to fd and req should be the same.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Link: https://lore.kernel.org/r/20240522114308.2402121-7-libaokun@huaweicloud.com
Acked-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions
