В ядре Linux устранена следующая уязвимость:
Fuse-uring: исправлено затирание EFAULT в Fuse_uring_commit.
copy_from_user() возвращает количество байтов, которые не были скопированы как беззнаковые.
остаток при сбое (1..sizeof(struct Fuse_out_header)). предохранитель_uring_commit
сохраняет этот остаток в ssize_t err, устанавливает для req->out.h.error значение -EFAULT,
затем переходит к выходу: ошибка все еще сохраняет положительный остаток.
err = copy_from_user(&req->out.h, &ent->headers->in_out,
sizeof(req->out.h));
если (ошибка) {
req->out.h.error = -EFAULT;
выйти; /* err — положительный остаток */
}
...
выход:
Fuse_uring_req_end (ent, req, err);
Fuse_uring_req_end() затем запускается
если (ошибка)
req->out.h.error = ошибка;
который перезаписывает только что назначенный -EFAULT положительным остатком.
Вызовы FUSE, такие как fuuse_simple_request(), тестируют ошибку < 0, чтобы обнаружить
неудача, поэтому положительное значение интерпретируется как успех, а
вызывающий абонент продолжает использовать неинициализированный или частичный req->out.args.
Исправьте, назначив err = -EFAULT в ветке сбоя перед переходом.
чтобы выйти, поэтому метод Fuse_uring_req_end() получает отрицательное значение ошибки и устанавливает
req->out.h.error в -EFAULT.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: fuse-uring: fix EFAULT clobber in fuse_uring_commit copy_from_user() returns the number of bytes not copied as an unsigned residual on failure (1..sizeof(struct fuse_out_header)). fuse_uring_commit stores that residual in ssize_t err, sets req->out.h.error to -EFAULT, then jumps to out: with err still holding the positive residual. err = copy_from_user(&req->out.h, &ent->headers->in_out, sizeof(req->out.h)); if (err) { req->out.h.error = -EFAULT; goto out; /* err is the positive residual */ } ... out: fuse_uring_req_end(ent, req, err); fuse_uring_req_end() then runs if (error) req->out.h.error = error; which overwrites the just-assigned -EFAULT with the positive residual. FUSE callers such as fuse_simple_request() test err < 0 to detect failure, so the positive value is interpreted as success and the caller proceeds with an uninitialised or partial req->out.args. Fix by assigning err = -EFAULT in the failure branch before jumping to out, so fuse_uring_req_end() receives a negative errno and sets req->out.h.error to -EFAULT.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 2
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.14
|
6.18.39
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.1.4
|