В ядре Linux была устранена следующая уязвимость: ntfs: Fix index_root куча OOB записывает в ntfs_ir_to_ib() ntfs_ir_to_ib копии всех записей из index_root в недавно выделенный буфер index_block_size-byte без проверки того, что записи вписываются в доступное пространство. Записи в index_root могут быть больше, чем полезное пространство входа в блоке индекса. Это может привести к тому, что OOB запишет конец распределения.
Валидатор ntfs_index_root_inconsistent() проверяет, что записи являются самосогласованными в пределах значения IR, но никогда не сверяет их с index_block_size. Нет проверки границ в ntfs_ir_to_ib () перед memcpy. Исправление этого в раковине в ntfs_ir_to_ib (), поскольку ntfs_index_root_inconsistent () подтверждает логическую согласованность index_root как структуры, а корень с большими записями является структурно действительным корнем.
Ошибка является конфликтом размеров ntfs_ir_to_ib(). Кроме того, валидатор вызывается один раз на загрузку inode в ntfs_read_locked_inode(), в то время как ntfs_ir_to_ib() вызывается только во время повторного родителя, проверка там не добавляет накладных расходов к общему пути. Более того, даже будущий путь вызова, который обходит валидатор, все равно будет защищен.
С NULL в качестве первого параметра ntfs_error(), флаг ошибки тома никогда не устанавливается этим вызовом, поэтому имя устройства будет отсутствовать в сообщении об ошибке. В любом случае, вызывающий абонент, ntfs_ir_reparent(), выводит сообщение об ошибке, которое включает имя устройства в NULL. Я думаю, что это лучшее решение, доступное без добавления «struct super_block * sb» в качестве параметра ntfs_ir_to_ib ().
Эта куча записей out-of-bounds запускается созданным образом файловой системы, которого нет в модели угроз ядра, в любом случае, исправление ошибок памяти было бы неплохо, чтобы обеспечить безопасность.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ntfs: Fix index_root heap OOB write in ntfs_ir_to_ib() ntfs_ir_to_ib copies all entries from index_root into a freshly allocated index_block_size-byte buffer without verifying that the entries fit in the available space. The entries in index_root may be larger than the usable entry space in the index block. This can cause OOB writes past the end of the allocation. The validator ntfs_index_root_inconsistent() checks that entries are self-consistent within the IR value, but never cross-checks them against index_block_size. There is no bounds check in ntfs_ir_to_ib() before the memcpy. Fixing this at the sink in ntfs_ir_to_ib() since ntfs_index_root_inconsistent() validates the logical consistency of index_root as a structure and a root with large entries is a structurally valid root. The bug is a size conflict of ntfs_ir_to_ib(). Also, the validator is called once per inode load in ntfs_read_locked_inode() while ntfs_ir_to_ib() is only called during a reparent, a check there adds no overhead to the common path. Moreover, even a future call path that bypasses the validator would still be protected. With NULL as first parameter of ntfs_error(), the volume error flag is never set by this call, so the device name will be absent from the error message. In any case, that the caller, ntfs_ir_reparent(), prints an error message that includes the device name on NULL returns. I think this is the best solution available without adding 'struct super_block *sb' as a parameter to ntfs_ir_to_ib(). This heap out-of-bounds write is triggered by a crafted filesystem image, which is not in the kernel threat model, anyway, fixing memory errors would be nice to keep things secure.
Характеристики атаки
Последствия
Строка CVSS v3.1