В ядре Linux устранена следующая уязвимость: ice: fix metadata_dst refcount handling on representor teardown ice_eswitch_release_repr() использует metadata_dst_free(), чтобы освободить metadata_dst репрезентатора. metadata_dst_free() непосредственно освобождает базовую память без проверки пересчета dst_entry. Когда ice_eswitch_port_start_xmit () обрабатывает пакет, он принимает ссылку через dst_hold () и присоединяет metadata_dst к skb. Если репрезентатор срывается, когда пакеты все еще стоят в очереди на нижнем устройстве (например, в qdisc), metadata_dst освобождается, когда ссылки все еще удерживаются.
Вместо этого используйте dst_release(), который правильно уменьшает рефконтинг и освобождает объект только тогда, когда все ссылки выпадают. Подсистема dst уже обрабатывает очистку metadata_dst в dst_destroy() при установке DST_METADATA. Другие драйверы, использующие этот шаблон (nfp, airoha, bnxt), уже используют dst_release () для своего жизненного цикла metadata_dst.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ice: fix metadata_dst refcount handling on representor teardown ice_eswitch_release_repr() uses metadata_dst_free() to release the representor's metadata_dst. metadata_dst_free() directly frees the underlying memory without checking the dst_entry refcount. When ice_eswitch_port_start_xmit() processes a packet, it takes a reference via dst_hold() and attaches the metadata_dst to the skb. If the representor is torn down while packets are still queued on the lower device (e.g. in a qdisc), the metadata_dst is freed while references are still held. Use dst_release() instead, which correctly decrements the refcount and only frees the object when all references are dropped. The dst subsystem already handles metadata_dst cleanup in dst_destroy() when DST_METADATA is set. Other drivers sharing this pattern (nfp, airoha, bnxt) already use dst_release() for their metadata_dst lifecycle.