Menu

Star on GitHub · 3.2k

CVE-2021-47182

5.5 · MEDIUM

In the Linux kernel, the following vulnerability has been resolved: scsi: core: Fix scsi_mode_sense() buffer length handling Several problems exist with scsi_mode_sense() buffer length handling:…

Published Apr 10, 2024CWE-770EPSS 0.20%

Overview

CVE-2021-47182 is a medium-severity vulnerability. It was published on April 10, 2024 and has a CVSS 3.1 base score of 5.5 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 5.5, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical description

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

scsi: core: Fix scsi_mode_sense() buffer length handling

Several problems exist with scsi_mode_sense() buffer length handling:

1) The allocation length field of the MODE SENSE(10) command is 16-bits,

occupying bytes 7 and 8 of the CDB. With this command, access to mode

pages larger than 255 bytes is thus possible. However, the CDB

allocation length field is set by assigning len to byte 8 only, thus

truncating buffer length larger than 255.

2) If scsi_mode_sense() is called with len smaller than 8 with

sdev->use_10_for_ms set, or smaller than 4 otherwise, the buffer length

is increased to 8 and 4 respectively, and the buffer is zero filled

with these increased values, thus corrupting the memory following the

buffer.

Fix these 2 problems by using put_unaligned_be16() to set the allocation

length field of MODE SENSE(10) CDB and by returning an error when len is

too small.

Furthermor

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2021-47182?

CVE-2021-47182 is a medium-severity vulnerability. It was published on April 10, 2024 and has a CVSS 3.1 base score of 5.5 (MEDIUM).

How severe is CVE-2021-47182?

This vulnerability has a CVSS 3.1 base score of 5.5, rated MEDIUM. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-47182?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-47182?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2021-47182 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related MEDIUM CVEs from 2021

View all