В ядре Linux была устранена следующая уязвимость: btrfs: fix reloc root cleanup in merge_reloc_roots() If the root we got has zero root refs in its root item, мы сбрасываем root's ->reloc_root без использования барьеров, как мы делаем везде. Sashiko жаловался на это при рассмотрении другого патча, и это правильно (см. тег Link ниже). Кроме того, мы не должны очищать BTRFS_ROOT_DEAD_RELOC_TREE от корня, если только корень не указывает на имеющийся у нас корень reloc.
Исправьте это, используя clear_reloc_root(), который создает барьер памяти после установки корневого ->reloc_root в NULL и перед очисткой бита BTRFS_ROOT_DEAD_RELOC_TREE от корня.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix reloc root cleanup in merge_reloc_roots() If the root we got has zero root refs in its root item, we are resetting the root's ->reloc_root without using barriers like we do everywhere else. Sashiko complained about this while reviewing another patch, and it's correct (see the Link tag below). Also, we should not clear BTRFS_ROOT_DEAD_RELOC_TREE from the root unless the root points to the reloc root we have. Fix this by using clear_reloc_root(), which issues the memory barrier after setting the root's ->reloc_root to NULL and before clearing the bit BTRFS_ROOT_DEAD_RELOC_TREE from the root.
Характеристики атаки
Последствия
Строка CVSS v3.1