Skip to content

Security problem with settings and littlefs

Low
d3zd3z published GHSA-5qhg-j6wc-4f6q Apr 26, 2021

Package

zephyr (west)

Affected versions

1.14.2, 2.3.0

Patched versions

2.4.0

Description

Impact

Settings is used to store security related information for bluetooth (e.g. bluetooth mesh keys, ...), this information is stored unencrypted.
Settings can use multiple backends to store this information: nvs, fcb, littlefs.
MCUmgr allows image management, device management and also file management. The file management can be used to copy files from a device. This file management is at the moment limited to littlefs.

Problem description

When settings is used in combination with littlefs all security related information can be extracted from the device using MCUmgr and this could be used e.g in bt-mesh to get the device key, network key, app keys from the device.

Proposed change

There are multiple ways to remove this security issue:

  1. Do not allow littlefs as a backend for security related settings.
  2. Encrypt the settings file so it cannot be used.
  3. Replace settings with another mechanism to store security related information.
  4. Remove file management from MCUmgr.

Patches

This has been fixed in:

Workaround

The fix for this issue edits the description of the MCUMGR_CMD_FS_MGMT feature to indicate that it is insecure, and adds a check to the hardened configuration to indicate this configuration should not be used. This issue can be addressed, without applying patches, by ensuring that this configuration option is disabled.

For more information

If you have any questions or comments about this advisory:

embargo: 2020-06-25
zepsec: ZEPSEC-57
initial-report: #22340

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

CVE ID

CVE-2020-13599

Weaknesses

Credits