В ядре Linux была устранена следующая уязвимость: ovl: не копируйте значение xattr, которое никогда не было прочитано Copy-up хранит неинициализированную память ядра в xattr верхнего файла, где пользователь может ее прочитать. ovl_copy_xattr() может передавать только байты в ovl_do_setxattr(), которые ovl_do_getxattr() прочитал. Когда чтение не удается с -ERANGE, функция снова запрашивает размер, и если новый размер соответствует буферу, он хранит буфер, хотя в нем ничего не было прочитано. Буфер происходит от kvmalloc(), или он по-прежнему удерживает значение предыдущего xattr.
Нижний слой FUSE, который отвечает на каждый размер GETXATTR с -ERANGE, сделал хранилище копирования 4096 байт, которые сервер никогда не отправлял, с указателем ядра в них, как xattr верхнего файла. Исправьте это, отказавшись от копирования с -EIO, когда следующий размер -ERANGE соответствует буферу.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ovl: do not copy up an xattr value that was never read Copy-up stores uninitialized kernel memory in an xattr of the upper file, where the user can read it. ovl_copy_xattr() may only pass bytes to ovl_do_setxattr() that ovl_do_getxattr() has read. When the read fails with -ERANGE the function asks for the size again, and if the new size fits the buffer it stores the buffer although nothing was read into it. The buffer comes from kvmalloc(), or it still holds the value of the previous xattr. A FUSE lower layer that answers every sized GETXATTR with -ERANGE made copy-up store 4096 bytes that the server never sent, with a kernel pointer in them, as an xattr of the upper file. Fix this by failing the copy-up with -EIO when the size that follows -ERANGE fits the buffer.