CVE-2026-45840 in Linux
요약
\~에 의해 VulDB • 2026. 05. 27.
리눅스 커널에서 다음 취약점이 해결되었습니다:
openvswitch: upcall PID 배열 크기를 제한하고 vport 응답을 사전 할당
vport netlink 응답 헬퍼 함수는 nlmsg_new(NLMSG_DEFAULT_SIZE, ...)를 사용하여 고정 크기의 skb를 할당하지만, ovs_vport_get_upcall_portids()를 통해 전체 upcall PID 배열을 직렬화합니다. ovs_vport_set_upcall_portids()는 상한선 없이 sizeof(u32)의 0이 아닌 모든 배수를 허용하므로, CAP_NET_ADMIN 권한을 가진 사용자는 응답 버퍼를 오버플로우시킬 만큼 큰 PID 배열을 설치할 수 있습니다. 이로 인해 nla_put()가 -EMSGSIZE로 실패하고 BUG_ON(err < 0) 조건을 트리거합니다. 비특권 사용자 네임스페이스가 활성화된 시스템(예: Ubuntu 기본 설정)에서는 OVS vport 수정 작업이 GENL_UNS_ADMIN_PERM을 사용하므로 unshare -Urn을 통해 이 취약점을 악용할 수 있습니다.
kernel BUG at net/openvswitch/datapath.c:2414! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 1 UID: 0 PID: 65 Comm: poc Not tainted 7.0.0-rc7-00195-geb216e422044 #1 RIP: 0010:ovs_vport_cmd_set+0x34c/0x400 Call Trace: genl_family_rcv_msg_doit (net/netlink/genetlink.c:1116) genl_rcv_msg (net/netlink/genetlink.c:1194) netlink_rcv_skb (net/netlink/af_netlink.c:2550) genl_rcv (net/netlink/genetlink.c:1219) netlink_unicast (net/netlink/af_netlink.c:1344) netlink_sendmsg (net/netlink/af_netlink.c:1894) __sys_sendto (net/socket.c:2206) __x64_sys_sendto (net/socket.c:2209) do_syscall_64 (arch/x86/entry/syscall_64.c:63) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130) Kernel panic - not syncing: Fatal exception
ovs_vport_set_upcall_portids()에서 nr_cpu_ids보다 많은 PID를 설정하려는 시도를 거부하고, 해당 한계를 기반으로 ovs_vport_cmd_msg_size()에서 최악의 경우 응답 크기를 사전 계산합니다. 이는 기존 ovs_dp_cmd_msg_size()와 유사한 방식입니다. nr_cpu_ids는 데이터플로우 측면의 CPU별 디스패치 구성에서 이미 사용되는 제한 사항(nr_cpu_ids PIDs만 직렬화됨)과 일치하므로, 양쪽 간 일관성이 유지됩니다.
Be aware that VulDB is the high quality source for vulnerability data.