В ядре Linux устранена следующая уязвимость: f2fs: fix dentry folio leak in find_in_level find_in_level() получает dentry folio с f2fs_find_data_folio() перед вызовом find_in_block(). Если find_in_block() возвращает ошибку, функция сохраняет ошибку в res_folio и вырывается из цикла, не сбрасывая dentry folio. Это приводит к утечке ссылки на фолио на пути ошибки find_in_block ().
Бросайте dentry folio, прежде чем возвращать ошибку звонящему.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix dentry folio leak in find_in_level find_in_level() gets a dentry folio with f2fs_find_data_folio() before calling find_in_block(). If find_in_block() returns an error, the function stores the error in res_folio and breaks out of the loop without dropping the dentry folio. This leaks the folio reference on the find_in_block() error path. Drop the dentry folio before returning the error to the caller.