CVE-2021-3348

Description

A use after free flaw in the Linux kernel network block device (NBD) subsystem was found in the way user calls an ioctl NBD_SET_SOCK at a certain point during device setup.

Statement

This flaw is rated as having a Moderate impact because in the default configuration, the issue can only be triggered by a privileged local user (with access to the nbd device).

Mitigation

To mitigate this issue, prevent the module nbd from being loaded. Please see https://access.redhat.com/solutions/41278 for information on how to blacklist a kernel module to prevent it from loading automatically.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score77N/A
Attack VectorLocalLocalN/A
Attack ComplexityHighHighN/A
Privileges RequiredLowLowN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityHighHighN/A
Integrity ImpactHighHighN/A
Availability ImpactHighHighN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

NVD: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Red Hat CVSS v3 Score Explanation

The CIA:H (C:H/I:H/A:H) since nbd_handle_cmd() func (after line "nsock = config->socks[index]" where nsock is pointer to the memory) does not only reading, but possibly allows some writing to the nsock memory right after (even KASAN detected problem during first reading). The AC:H (attack complexity high), because this is race condition that unlikely to happen and looks like it would be hard (if even possible) to prepare something particular in memory during (or just before) this race condition and both usage of nsock limited inside func nbd_handle_cmd().

Understanding the Weakness (CWE)

Integrity,Other

Technical Impact: Alter Execution Logic; Unexpected State

The main problem is that -- if a lock is overcome -- data could be altered in a bad state.

Frequently Asked Questions

Want to get errata notifications? Sign up here.