Re: [PATCH 09/12] cachefiles: defer exposing anon_fd until after copy_to_user() succeeds

2024-05-05 Thread Baokun Li
On 2024/5/6 11:24, Jingbo Xu wrote: On 4/24/24 11:39 AM, libao...@huaweicloud.com wrote: From: Baokun Li After installing the anonymous fd, we can now see it in userland and close it. However, at this point we may not have gotten the reference count of the cache, but we will put it during col

Re: [PATCH 09/12] cachefiles: defer exposing anon_fd until after copy_to_user() succeeds

2024-05-05 Thread Jingbo Xu
On 4/24/24 11:39 AM, libao...@huaweicloud.com wrote: > From: Baokun Li > > After installing the anonymous fd, we can now see it in userland and close > it. However, at this point we may not have gotten the reference count of > the cache, but we will put it during colse fd, so this may cause a

[PATCH 09/12] cachefiles: defer exposing anon_fd until after copy_to_user() succeeds

2024-04-23 Thread libaokun
From: Baokun Li After installing the anonymous fd, we can now see it in userland and close it. However, at this point we may not have gotten the reference count of the cache, but we will put it during colse fd, so this may cause a cache UAF. To avoid this, we will make the anonymous fd accessibl