+20
−7
Loading
mainline inclusion from mainline-v6.10-rc4 commit a26dc49df37e996876f50a0210039b2d211fdd6f category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IA6I1T Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a26dc49df37e996876f50a0210039b2d211fdd6f -------------------------------- 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> Signed-off-by:
Zizhi Wo <wozizhi@huawei.com>