CVE-2023-53511
Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
01/10/2025
Última modificación:
02/10/2025
Descripción
*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
io_uring: fix fget leak when fs don&#39;t support nowait buffered read<br />
<br />
Heming reported a BUG when using io_uring doing link-cp on ocfs2. [1]<br />
<br />
Do the following steps can reproduce this BUG:<br />
mount -t ocfs2 /dev/vdc /mnt/ocfs2<br />
cp testfile /mnt/ocfs2/<br />
./link-cp /mnt/ocfs2/testfile /mnt/ocfs2/testfile.1<br />
umount /mnt/ocfs2<br />
<br />
Then umount will fail, and it outputs:<br />
umount: /mnt/ocfs2: target is busy.<br />
<br />
While tracing umount, it blames mnt_get_count() not return as expected.<br />
Do a deep investigation for fget()/fput() on related code flow, I&#39;ve<br />
finally found that fget() leaks since ocfs2 doesn&#39;t support nowait<br />
buffered read.<br />
<br />
io_issue_sqe<br />
|-io_assign_file // do fget() first<br />
|-io_read<br />
|-io_iter_do_read<br />
|-ocfs2_file_read_iter // return -EOPNOTSUPP<br />
|-kiocb_done<br />
|-io_rw_done<br />
|-__io_complete_rw_common // set REQ_F_REISSUE<br />
|-io_resubmit_prep<br />
|-io_req_prep_async // override req->file, leak happens<br />
<br />
This was introduced by commit a196c78b5443 in v5.18. Fix it by don&#39;t<br />
re-assign req->file if it has already been assigned.<br />
<br />
[1] https://lore.kernel.org/ocfs2-devel/ab580a75-91c8-d68a-3455-40361be1bfa8@linux.alibaba.com/T/#t



