Debian等の複数ベンダの製品における初期化されていないリソースの使用に関する脆弱性
タイトル Debian等の複数ベンダの製品における初期化されていないリソースの使用に関する脆弱性
概要

Linuxカーネルにおいて、以下の脆弱性が修正されました。nsh:nsh_gso_segment()関数で外側ヘッダーのskb-{protocol, data, mac_header}を正しく復元しなかった問題です。syzbotは、VIRTIO_NET_HDR_GSO_UDPで階層化された以下のプロトコルを持つ細工されたGSOパケットにより、様々なクラッシュ([0]およびリンク参照)を引き起こしました。対象のプロトコルはETH_P_8021AD + ETH_P_NSH + ETH_P_IPV6 + IPPROTO_UDPです。NSHはIPv4、IPv6、イーサネット、NSH、およびMPLSをカプセル化できます。内側のプロトコルがイーサネットの場合、NSHのGSOハンドラであるnsh_gso_segment()はskb_mac_gso_segment()を呼び出して内側プロトコルのGSOハンドラを起動します。nsh_gso_segment()はskb_mac_gso_segment()を呼び出す前に元のskbに対して以下の処理を行います。1. skb-network_headerをリセットする。2. 元のskbの{mac_header, mac_len}をローカル変数に保存する。3. NSHヘッダーをプルする。4. skb-mac_headerをリセットする。5. 内側プロトコルのためにskb-mac_lenとskb-protocolを設定する。segmented skbに対しては以下の処理を行います。6. ntohs(ETH_P_NSH)をskb-protocolにセットする。7. NSHヘッダーをプッシュする。8. skb-mac_headerを復元する。9. skb-mac_header + mac_lenをskb-network_headerにセットする。10. skb-mac_lenを復元する。6-7および8-9の段階に二つの問題が存在します。(a) 6および7の後、skb-dataはNSHヘッダーを指すため、skbがnetdevから送信される際に外側ヘッダー(この場合はETH_P_8021AD)が剥がされます。また、NSHがNSH+Ethernet(NSH-Ethernet-NSH)でカプセル化されている場合、最初のnsh_gso_segment()のskb_pull()でskb-dataが外側NSHまたはイーサネットヘッダーの途中を指してしまいます。これは2回目のnsh_gso_segment()でイーサネットヘッダーがプルされないために起こります。(b) 8および9でskb-{mac_header, network_header}を復元する際、nsh_gso_segment()は線形バッファ内のデータシフトを考慮していません。しかし、udp6_ufo_fragment()はデータをシフトし、syzbotで示されたようにskb-mac_headerを変更する可能性があります。これが起こると、復元したskb-mac_headerが外側ヘッダーの途中を指すことになります。これまでnsh_gso_segment()は外側ヘッダーと連携して動作していませんでした。nsh_gso_segment()の最後には、NSHヘッダーではなく、細分化されたskbの外側ヘッダーが復元される必要があります。そのために、内側ヘッダーからの相対位置で外側ヘッダーの位置を計算し、skb-{data, mac_header, protocol}を適切に設定します。[0]: BUG: KMSAN: uninit-value in ipvlan_process_outbound drivers/net/ipvlan/ipvlan_core.c:524 [inline] 以下略。

想定される影響 当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 また、当該ソフトウェアが扱う情報について、書き換えは発生しません。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 
対策

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

公表日 2024年5月30日0:00
登録日 2026年1月27日17:37
最終更新日 2026年1月27日17:37
CVSS3.0 : 警告
スコア 5.5
ベクター CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
Debian
Debian GNU/Linux 10.0
Linux
Linux Kernel 4.14 以上 4.19.314 未満
Linux Kernel 4.20 以上 5.4.276 未満
Linux Kernel 5.11 以上 5.15.159 未満
Linux Kernel 5.16 以上 6.1.91 未満
Linux Kernel 5.5 以上 5.10.217 未満
Linux Kernel 6.2 以上 6.6.31 未満
Linux Kernel 6.7 以上 6.8.10 未満
Linux Kernel 6.9
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年01月27日]
  掲載
2026年1月27日17:37

NVD脆弱性情報
CVE-2024-36933
概要

In the Linux kernel, the following vulnerability has been resolved:

nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().

syzbot triggered various splats (see [0] and links) by a crafted GSO
packet of VIRTIO_NET_HDR_GSO_UDP layering the following protocols:

ETH_P_8021AD + ETH_P_NSH + ETH_P_IPV6 + IPPROTO_UDP

NSH can encapsulate IPv4, IPv6, Ethernet, NSH, and MPLS. As the inner
protocol can be Ethernet, NSH GSO handler, nsh_gso_segment(), calls
skb_mac_gso_segment() to invoke inner protocol GSO handlers.

nsh_gso_segment() does the following for the original skb before
calling skb_mac_gso_segment()

1. reset skb->network_header
2. save the original skb->{mac_heaeder,mac_len} in a local variable
3. pull the NSH header
4. resets skb->mac_header
5. set up skb->mac_len and skb->protocol for the inner protocol.

and does the following for the segmented skb

6. set ntohs(ETH_P_NSH) to skb->protocol
7. push the NSH header
8. restore skb->mac_header
9. set skb->mac_header + mac_len to skb->network_header
10. restore skb->mac_len

There are two problems in 6-7 and 8-9.

(a)
After 6 & 7, skb->data points to the NSH header, so the outer header
(ETH_P_8021AD in this case) is stripped when skb is sent out of netdev.

Also, if NSH is encapsulated by NSH + Ethernet (so NSH-Ethernet-NSH),
skb_pull() in the first nsh_gso_segment() will make skb->data point
to the middle of the outer NSH or Ethernet header because the Ethernet
header is not pulled by the second nsh_gso_segment().

(b)
While restoring skb->{mac_header,network_header} in 8 & 9,
nsh_gso_segment() does not assume that the data in the linear
buffer is shifted.

However, udp6_ufo_fragment() could shift the data and change
skb->mac_header accordingly as demonstrated by syzbot.

If this happens, even the restored skb->mac_header points to
the middle of the outer header.

It seems nsh_gso_segment() has never worked with outer headers so far.

At the end of nsh_gso_segment(), the outer header must be restored for
the segmented skb, instead of the NSH header.

To do that, let's calculate the outer header position relatively from
the inner header and set skb->{data,mac_header,protocol} properly.

[0]:
BUG: KMSAN: uninit-value in ipvlan_process_outbound drivers/net/ipvlan/ipvlan_core.c:524 [inline]
BUG: KMSAN: uninit-value in ipvlan_xmit_mode_l3 drivers/net/ipvlan/ipvlan_core.c:602 [inline]
BUG: KMSAN: uninit-value in ipvlan_queue_xmit+0xf44/0x16b0 drivers/net/ipvlan/ipvlan_core.c:668
ipvlan_process_outbound drivers/net/ipvlan/ipvlan_core.c:524 [inline]
ipvlan_xmit_mode_l3 drivers/net/ipvlan/ipvlan_core.c:602 [inline]
ipvlan_queue_xmit+0xf44/0x16b0 drivers/net/ipvlan/ipvlan_core.c:668
ipvlan_start_xmit+0x5c/0x1a0 drivers/net/ipvlan/ipvlan_main.c:222
__netdev_start_xmit include/linux/netdevice.h:4989 [inline]
netdev_start_xmit include/linux/netdevice.h:5003 [inline]
xmit_one net/core/dev.c:3547 [inline]
dev_hard_start_xmit+0x244/0xa10 net/core/dev.c:3563
__dev_queue_xmit+0x33ed/0x51c0 net/core/dev.c:4351
dev_queue_xmit include/linux/netdevice.h:3171 [inline]
packet_xmit+0x9c/0x6b0 net/packet/af_packet.c:276
packet_snd net/packet/af_packet.c:3081 [inline]
packet_sendmsg+0x8aef/0x9f10 net/packet/af_packet.c:3113
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
__sys_sendto+0x735/0xa10 net/socket.c:2191
__do_sys_sendto net/socket.c:2203 [inline]
__se_sys_sendto net/socket.c:2199 [inline]
__x64_sys_sendto+0x125/0x1c0 net/socket.c:2199
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

Uninit was created at:
slab_post_alloc_hook mm/slub.c:3819 [inline]
slab_alloc_node mm/slub.c:3860 [inline]
__do_kmalloc_node mm/slub.c:3980 [inline]
__kmalloc_node_track_caller+0x705/0x1000 mm/slub.c:4001
kmalloc_reserve+0x249/0x4a0 net/core/skbuff.c:582
__
---truncated---

公表日 2024年5月31日1:15
登録日 2024年5月31日10:00
最終更新日 2024年11月21日18:22
関連情報、対策とツール
共通脆弱性一覧