CVE-2022-50064: virtio-blk: Avoid use-after-free on suspend/resume

Published Jun 18, 2025
·
Updated

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

virtio-blk: Avoid use-after-free on suspend/resume

hctx->userdata is set to vq in virtblkinithctx(). However, vq is freed on suspend and reallocated on resume. So, hctx->userdata is invalid after resume, and it will cause use-after-free accessing which will result in the kernel crash something like below:

[ 22.428391] Call Trace: [ 22.428899] <TASK> [ 22.429339] virtqueueaddsplit+0x3eb/0x620 [ 22.430035] ? blkmqallocrequests+0x17f/0x2d0 [ 22.430789] ? kvmclockgetcycles+0x14/0x30 [ 22.431496] virtqueueaddsgs+0xad/0xd0 [ 22.432108] virtblkaddreq+0xe8/0x150 [ 22.432692] virtioqueuerqs+0xeb/0x210 [ 22.433330] blkmqflushpluglist+0x1b8/0x280 [ 22.434059] blkflushplug+0xe1/0x140 [ 22.434853] blkfinishplug+0x20/0x40 [ 22.435512] readpages+0x20a/0x2e0 [ 22.436063] ? folioaddlru+0x62/0xa0 [ 22.436652] pagecacheraunbounded+0x112/0x160 [ 22.437365] filemapgetpages+0xe1/0x5b0 [ 22.437964] ? contexttosid+0x70/0x100 [ 22.438580] ? sidtabcontexttosid+0x32/0x400 [ 22.439979] filemapread+0xcd/0x3d0 [ 22.440917] xfsfilebufferedread+0x4a/0xc0 [ 22.441984] xfsfilereaditer+0x65/0xd0 [ 22.442970] kernelread+0x160/0x2e0 [ 22.443921] bprmexecve+0x21b/0x640 [ 22.444809] doexecveatcommon.isra.0+0x1a8/0x220 [ 22.446008] x64sysexecve+0x2d/0x40 [ 22.446920] dosyscall64+0x37/0x90 [ 22.447773] entrySYSCALL64afterhwframe+0x63/0xcd

This patch fixes this issue by getting vq from vblk, and removes virtblkinithctx().

Affected Software

6 affected componentsFixes available
Linux Kernel
Linux Linux kernel>=5.19<5.19.4
debian/linux<6.0.2-1
6.0.2-1
debian/linux<6.0.2-1
6.0.2-1
debian/linux<6.0.2-1
6.0.2-1
debian/linux
6.0.2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.0.2-1

Event History

Jun 18, 2025
CVE Published
via MITRE·11:02 AM
Data Sourced
via MITRE·11:02 AM
Description
Data Sourced
via NVD·11:15 AM
Description
Data Sourced
via OSV·11:15 AM
DescriptionSeverityAffected Software
Data Sourced
via Red Hat·12:04 PM
DescriptionSeverityAffected Software
Nov 13, 2025
Data Sourced
via NVD·06:26 PM
RemedySeverityWeaknessAffected Software
Aug 4, 2026
Data Sourced
via MITRE·09:07 AM
Severity
Updated
via NVD·10:18 AM
Severity

Frequently Asked Questions

1

What is the severity of CVE-2022-50064?

CVE-2022-50064 has a medium severity rating due to the potential for use-after-free vulnerabilities during suspend and resume operations.

2

How do I fix CVE-2022-50064?

To fix CVE-2022-50064, ensure you update to the patched version of the Linux kernel where this vulnerability has been resolved.

3

What systems are affected by CVE-2022-50064?

CVE-2022-50064 affects systems running vulnerable versions of the Linux kernel that utilize virtio-blk.

4

What are the risks of not patching CVE-2022-50064?

Not patching CVE-2022-50064 could lead to potential data corruption or system instability due to use-after-free conditions.

5

When was CVE-2022-50064 identified?

CVE-2022-50064 was identified in 2022 and addresses a specific issue in the Linux kernel's virtio-blk implementation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203