Rick Edgecombe 03f5a999ad Drivers: hv: vmbus: Leak pages if set_memory_encrypted() fails
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.

VMBus code could free decrypted pages if set_memory_encrypted()/decrypted()
fails. Leak the pages if this happens.

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-2-mhklinux@outlook.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20240311161558.1310-2-mhklinux@outlook.com>
2024-04-10 21:33:32 +00:00
..
2024-02-28 12:20:00 -08:00
2024-01-12 11:32:19 -08:00
2024-02-17 08:56:41 -08:00
2024-02-10 08:02:48 -08:00
2024-02-06 14:10:47 +08:00
2024-01-18 11:37:24 -08:00
2024-02-16 18:51:00 -05:00
2024-01-10 08:45:22 -08:00
2024-01-18 09:48:40 -08:00
2024-03-06 07:42:08 +01:00
2024-01-18 11:37:24 -08:00
2024-03-08 13:40:56 +10:00
2024-01-18 11:37:24 -08:00
2024-01-09 16:32:11 -08:00
2024-03-08 13:06:35 -08:00
2024-03-01 17:22:46 -08:00
2024-01-18 11:37:24 -08:00
2024-01-17 15:25:27 -08:00
2023-12-15 17:07:05 +01:00
2024-01-18 15:16:57 -08:00
2024-01-18 11:37:24 -08:00
2024-02-05 16:16:24 +01:00
2024-01-18 16:44:03 -08:00
2024-03-01 17:18:35 -08:00
2024-01-05 15:55:41 +05:30
2024-03-01 12:44:33 -08:00
2024-01-17 14:37:40 -08:00
2024-01-11 11:31:46 -08:00
2024-02-23 09:54:13 -08:00
2024-01-18 17:08:31 -08:00
2023-12-15 17:27:04 +01:00
2024-02-17 08:52:38 -08:00
2024-03-02 19:47:01 +01:00
2024-01-04 17:03:47 +01:00
2024-01-18 16:44:03 -08:00
2024-01-18 15:57:25 -08:00
2024-01-18 16:44:03 -08:00
2024-03-05 12:38:50 -08:00
2024-01-18 16:44:03 -08:00
2024-01-12 13:32:30 -08:00
2024-01-12 12:38:37 +01:00