linux-stable/drivers/net
Rick Edgecombe a56fe61132 hv_netvsc: Don't free decrypted memory
[ Upstream commit bbf9ac3467 ]

In CoCo VMs it is possible for the untrusted host to cause
set_memory_encrypted() or set_memory_decrypted() to fail such that an
error is returned and the resulting memory is shared. Callers need to
take care to handle these errors to avoid returning decrypted (shared)
memory to the page allocator, which could lead to functional or security
issues.

The netvsc driver could free decrypted/shared pages if
set_memory_decrypted() fails. Check the decrypted field in the gpadl
to decide whether to free the memory.

Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/r/20240311161558.1310-4-mhklinux@outlook.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20240311161558.1310-4-mhklinux@outlook.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-17 12:02:17 +02:00
..
appletalk
arcnet
bonding xdp, bonding: Fix feature flags when there are no slave devs anymore 2024-03-15 10:48:18 -04:00
caif
can can: m_can: Start/Cancel polling timer together with interrupts 2024-03-26 18:19:29 -04:00
dsa net: dsa: mv88e6xxx: Fix number of databases for 88E6141 / 88E6341 2024-05-17 12:02:05 +02:00
ethernet net: bcmgenet: Reset RBUF on first open 2024-05-17 12:02:13 +02:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Don't free decrypted memory 2024-05-17 12:02:17 +02:00
ieee802154
ipa
ipvlan
mctp
mdio
netdevsim
pcs net: pcs: xpcs: Return EINVAL in the internal methods 2024-04-13 13:07:31 +02:00
phy net: phy: dp83869: Fix MII mode failure 2024-05-02 16:32:39 +02:00
plip
ppp
pse-pd
slip
team
thunderbolt
usb net: usb: ax88179_178a: stop lying about skb->truesize 2024-05-02 16:32:36 +02:00
vmxnet3 vmxnet3: Fix missing reserved tailroom 2024-03-26 18:20:08 -04:00
vxlan vxlan: Pull inner IP header in vxlan_rcv(). 2024-05-17 12:02:06 +02:00
wan
wireguard wireguard: netlink: access device through ctx instead of peer 2024-04-03 15:28:36 +02:00
wireless wifi: iwlwifi: mvm: guard against invalid STA ID on removal 2024-05-17 12:02:10 +02:00
wwan net: wwan: t7xx: Split 64bit accesses to fix alignment issues 2024-04-10 16:35:42 +02:00
xen-netback
amt.c
bareudp.c
dummy.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
eql.c
geneve.c geneve: fix header validation in geneve[6]_xmit_skb 2024-04-17 11:19:28 +02:00
gtp.c net: gtp: Fix Use-After-Free in gtp_dellink 2024-05-02 16:32:36 +02:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
macsec.c macsec: Detect if Rx skb is macsec-related for offloading devices that update md_dst 2024-05-02 16:32:50 +02:00
macvlan.c
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
tun.c tun: limit printing rate when illegal packet received by tun dev 2024-04-27 17:11:33 +02:00
veth.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
virtio_net.c virtio_net: Do not send RSS key if it is not supported 2024-04-27 17:11:43 +02:00
vrf.c
vsockmon.c
xen-netfront.c xen-netfront: Add missing skb_mark_for_recycle 2024-04-10 16:35:49 +02:00