diff options
author | Baokun Li <[email protected]> | 2024-05-22 19:43:02 +0800 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2024-05-29 13:03:30 +0200 |
commit | a26dc49df37e996876f50a0210039b2d211fdd6f (patch) | |
tree | 3694199b7034232b83d56cb649a82e55759576f4 /lib/test_fortify/write_overflow-strncpy-src.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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Jeff Layton <[email protected]>
Reviewed-by: Jingbo Xu <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions