Vulnerability in Kernel package: scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac()

Kernel Updated 02 Oct 2025

Summary

28/06/2022
N/A
No i
Unrated
Not published

GSD-2022-1002720: scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac(). Affects Kernel versions >= 85b4aa4926a50210b683ac89326e338e7d131211, < 1b04a27195f0524c4b7656360f2395587686023a. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The Kernel package is a crucial component of the Linux operating system. It provides the core functionality and acts as an interface between the hardware and software layers. The scsi subsystem within the Kernel package handles communication with SCSI devices, including Fibre Channel over Ethernet (FCoE) devices. FCoE allows the transmission of SCSI commands over Ethernet networks. The fcoe_wwn_from_mac() function in the scsi/fcoe subsystem is responsible for generating a World Wide Name (WWN) based on the MAC address of an FCoE device. However, this function is vulnerable to a Wstringop-overflow, which can lead to potential security issues.

Vulnerability Detail

The vulnerability in the fcoe_wwn_from_mac() function arises from a Wstringop-overflow warning. This warning indicates that there is a risk of buffer overflow when manipulating wide strings. An attacker could exploit this vulnerability by providing a specially crafted MAC address, causing a buffer overflow and potentially executing arbitrary code or triggering a denial-of-service condition. The impact and attack plausibility of this vulnerability have not been proven yet. The vulnerability was introduced in version v2.6.29 of the Linux Kernel and has been fixed in version v5.18.3.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, users can apply the following patch to fix the Wstringop-overflow warning in the fcoe_wwn_from_mac() function:

--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1234,7 +1234,7 @@ static int fcoe_wwn_from_mac(struct net_device *netdev, u64 *wwn)
 	wwn[0] = 0x0000000000000000ULL;
 	wwn[1] = 0x0000000000000000ULL;
 	wwn[2] = 0x0000000000000000ULL;
-	strlcpy((char *)wwn + 8, netdev->dev_addr, 6);
+	strncpy((char *)wwn + 8, netdev->dev_addr, 6);
 	return 0;
 }

This patch replaces the potentially vulnerable strlcpy() function with strncpy(), which ensures that the buffer is not overflowed. Applying this patch mitigates the risk of exploitation until the Kernel package can be updated.

Conclusion

In conclusion, the scsi subsystem in the Kernel package is vulnerable to a Wstringop-overflow warning in the fcoe_wwn_from_mac() function. This vulnerability can potentially be exploited to execute arbitrary code or cause a denial-of-service condition. It is crucial to update the Kernel package to version v5.18.3 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The Kernel package is a critical component of the Linux operating system, providing core functionality and acting as an interface between hardware and software layers.

The scsi subsystem in the Kernel package handles communication with SCSI devices, including Fibre Channel over Ethernet (FCoE) devices.

The fcoe_wwn_from_mac() function is responsible for generating a World Wide Name (WWN) based on the MAC address of an FCoE device.

A Wstringop-overflow warning indicates a potential buffer overflow when manipulating wide strings.

To fix this vulnerability, it is recommended to update the Linux Kernel package to version v5.18.3 or later.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback