mbox series

[SRU,F,0/2] CVE-2021-47070

Message ID 20240401231208.58101-1-bethany.jamison@canonical.com
Headers show
Series [SRU,F,1/2] uio: uio_hv_generic: use devm_kzalloc() for private data alloc | expand

Message

Bethany Jamison April 1, 2024, 11:12 p.m. UTC
[Impact]

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

 uio_hv_generic: Fix another memory leak in error handling paths

 Memory allocated by 'vmbus_alloc_ring()' at the beginning of the probe
 function is never freed in the error handling path.

 Add the missing 'vmbus_free_ring()' call.

 Note that it is already freed in the .remove function.

[Fix]

Mantic:	not-affected
Jammy:	not-affected
Focal:	Fix and prereq commits were cleanly cherry-picked.
Bionic:	not-affected
Xenial:	not-affected
Trusty: not-affected

[Test Case]

Compile and boot tested.

[Where problems could occur]

This fix affects those who use the hyper-v UIO driver, issues with the
fix would be visible with loss of memory resources including slower
performance and potentially a future system crash.

Alexandru Ardelean (1):
  uio: uio_hv_generic: use devm_kzalloc() for private data alloc

Christophe JAILLET (1):
  uio_hv_generic: Fix another memory leak in error handling paths

 drivers/uio/uio_hv_generic.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comments

Portia Stephens April 2, 2024, 5:40 a.m. UTC | #1
On Mon, Apr 01, 2024 at 06:12:06PM -0500, Bethany Jamison wrote:
> [Impact]
> 
>  In the Linux kernel, the following vulnerability has been resolved:
> 
>  uio_hv_generic: Fix another memory leak in error handling paths
> 
>  Memory allocated by 'vmbus_alloc_ring()' at the beginning of the probe
>  function is never freed in the error handling path.
> 
>  Add the missing 'vmbus_free_ring()' call.
> 
>  Note that it is already freed in the .remove function.
> 
> [Fix]
> 
> Mantic:	not-affected
> Jammy:	not-affected
> Focal:	Fix and prereq commits were cleanly cherry-picked.
> Bionic:	not-affected
> Xenial:	not-affected
> Trusty: not-affected
> 
> [Test Case]
> 
> Compile and boot tested.
> 
> [Where problems could occur]
> 
> This fix affects those who use the hyper-v UIO driver, issues with the
> fix would be visible with loss of memory resources including slower
> performance and potentially a future system crash.
> 
> Alexandru Ardelean (1):
>   uio: uio_hv_generic: use devm_kzalloc() for private data alloc
> 
> Christophe JAILLET (1):
>   uio_hv_generic: Fix another memory leak in error handling paths
> 
>  drivers/uio/uio_hv_generic.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)

Acked-by: Portia Stephens <portia.stephens@canonical.com>
Tim Gardner April 4, 2024, 1:44 p.m. UTC | #2
On 4/1/24 5:12 PM, Bethany Jamison wrote:
> [Impact]
> 
>   In the Linux kernel, the following vulnerability has been resolved:
> 
>   uio_hv_generic: Fix another memory leak in error handling paths
> 
>   Memory allocated by 'vmbus_alloc_ring()' at the beginning of the probe
>   function is never freed in the error handling path.
> 
>   Add the missing 'vmbus_free_ring()' call.
> 
>   Note that it is already freed in the .remove function.
> 
> [Fix]
> 
> Mantic:	not-affected
> Jammy:	not-affected
> Focal:	Fix and prereq commits were cleanly cherry-picked.
> Bionic:	not-affected
> Xenial:	not-affected
> Trusty: not-affected
> 
> [Test Case]
> 
> Compile and boot tested.
> 
> [Where problems could occur]
> 
> This fix affects those who use the hyper-v UIO driver, issues with the
> fix would be visible with loss of memory resources including slower
> performance and potentially a future system crash.
> 
> Alexandru Ardelean (1):
>    uio: uio_hv_generic: use devm_kzalloc() for private data alloc
> 
> Christophe JAILLET (1):
>    uio_hv_generic: Fix another memory leak in error handling paths
> 
>   drivers/uio/uio_hv_generic.c | 12 +++++-------
>   1 file changed, 5 insertions(+), 7 deletions(-)
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Roxana Nicolescu April 8, 2024, 7:10 a.m. UTC | #3
On 02/04/2024 01:12, Bethany Jamison wrote:
> [Impact]
>
>   In the Linux kernel, the following vulnerability has been resolved:
>
>   uio_hv_generic: Fix another memory leak in error handling paths
>
>   Memory allocated by 'vmbus_alloc_ring()' at the beginning of the probe
>   function is never freed in the error handling path.
>
>   Add the missing 'vmbus_free_ring()' call.
>
>   Note that it is already freed in the .remove function.
>
> [Fix]
>
> Mantic:	not-affected
> Jammy:	not-affected
> Focal:	Fix and prereq commits were cleanly cherry-picked.
> Bionic:	not-affected
> Xenial:	not-affected
> Trusty: not-affected
>
> [Test Case]
>
> Compile and boot tested.
>
> [Where problems could occur]
>
> This fix affects those who use the hyper-v UIO driver, issues with the
> fix would be visible with loss of memory resources including slower
> performance and potentially a future system crash.
>
> Alexandru Ardelean (1):
>    uio: uio_hv_generic: use devm_kzalloc() for private data alloc
>
> Christophe JAILLET (1):
>    uio_hv_generic: Fix another memory leak in error handling paths
>
>   drivers/uio/uio_hv_generic.c | 12 +++++-------
>   1 file changed, 5 insertions(+), 7 deletions(-)
>
Applied to focal master-next branch. Thanks!