← ALL ADVISORIES

MEDIUM BYTERAY-2026-0358Disclosed

wolfSSL — Reduced Compiler Warning Level in the sslSniffer Visual Studio Project

sslSniffer/sslSniffer.vcxproj compiles the sniffer at MSVC warning level 3 in all six configurations, Debug included, and does not treat warnings as errors. The sniffer source gets fewer MSVC diagnostics than the library's Debug builds. This is a build-hardening observation and not a vulnerability in the sniffer code.

Advisory
BYTERAY-2026-0358
CWE
CWE-1127
CVSS
5.0 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L)
Vendor
wolfSSL
Product
wolfSSL
Reported
2026-09-28
Disclosure
2026-12-03
Affected
wolfSSL 5.9.2 through 5.9.4, Windows builds of the sniffer DLL from sslSniffer/sslSniffer.vcxproj
Credit
Mehrun P. Hunter and Shahriyar Jalayeri, ByteRay Ltd.

Executive Summary

The wolfSSL sniffer decodes captured TLS traffic. On Windows it is built as a DLL from sslSniffer/sslSniffer.vcxproj, which compiles one source file, src/sniffer.c, and links the library project.

Every configuration in that project sets the MSVC warning level to Level3. The main library project uses Level4 for its Debug configurations; the sniffer project does not use it anywhere. No configuration sets TreatWarningAsError. A diagnostic that MSVC issues only at level 4 is therefore never shown for src/sniffer.c in a build from this project, and a warning that is shown does not stop the build.

The sniffer parses packets that other parties put on the network, which is why the diagnostics applied to it are worth knowing. The setting itself is not reachable by those packets. This advisory does not describe a flaw that an attacker can trigger, and it does not identify a defect in src/sniffer.c that the setting hides.

Affected Products and Versions

  • Component: Visual Studio project sslSniffer/sslSniffer.vcxproj, which builds src/sniffer.c as a dynamic library.
  • Condition: the sniffer is built with MSBuild or Visual Studio from this project, in any of the Debug or Release configurations for Win32, x64 or ARM64.
  • Tested: wolfSSL master d95483fff72d6e987394b72edca433d4b580a0f4 (version string 5.9.2).
  • The v5.9.2-stable and v5.9.4-stable tags have Level3 in the same six places.
  • Not changed on master as of 2026-12-03.
  • A default ./configure build does not use this file and does not build the sniffer. The autotools sniffer build (--enable-sniffer) takes its warning flags from the autotools macros instead. Earlier releases were not checked.

Technical Details

The compile settings of the first configuration, at sslSniffer/sslSniffer.vcxproj:123-134:

  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <ClCompile>
      <Optimization>Disabled</Optimization>
      <AdditionalIncludeDirectories>../;../IDE/WIN;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>WOLFSSL_LIB;SSL_SNIFFER_EXPORTS;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <MinimalRebuild>true</MinimalRebuild>
      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
      <PrecompiledHeader />
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
    </ClCompile>

The full picture in the file:

  1. WarningLevel appears six times, once per configuration, and each value is Level3: sslSniffer/sslSniffer.vcxproj:132, sslSniffer/sslSniffer.vcxproj:152, sslSniffer/sslSniffer.vcxproj:170, sslSniffer/sslSniffer.vcxproj:188, sslSniffer/sslSniffer.vcxproj:211 and sslSniffer/sslSniffer.vcxproj:232.
  2. The only source compiled is src/sniffer.c (sslSniffer/sslSniffer.vcxproj:244).
  3. TreatWarningAsError does not appear in the file. A search of the tested tree finds it in no project or property file.

For comparison, the library project sets Level4 in its Debug configurations (wolfssl.vcxproj:243) and Level3 in its Release configurations (wolfssl.vcxproj:344). The older sslSniffer/sslSniffer.vcproj has the same level 3 setting in both of its configurations (sslSniffer/sslSniffer.vcproj:50, sslSniffer/sslSniffer.vcproj:125).

Reachability and Preconditions

  • The sniffer is built from this Visual Studio project.
  • The person running the build controls the setting and can change it. There is no attacker position, authentication state or user interaction to describe: nothing at run time depends on a warning level, and no packet can influence it.

Impact

Confirmed: src/sniffer.c is compiled without level 4 MSVC diagnostics in every configuration of this project, and no MSVC warning fails the build.

That is a reduction in what the compiler tells the person building. It has a security consequence only if src/sniffer.c contains a defect that MSVC would report at level 4 and that nothing else catches. None is identified here. The same file is also compiled under the autotools warning set (m4/ax_harden_compiler_flags.m4:119-161) when the sniffer is enabled there, so the MSVC level is not the only check it receives. No memory-safety or parsing weakness follows from the setting itself.

ByteRay did not build a proof of concept for this issue. The analysis is from source review.

Remediation and Mitigation

Not fixed on wolfSSL master as of commit e4b0841b32e7 (2026-12-03). All six configurations there still set Level3.

A change, if upstream wants one, would raise the six entries to Level4 to match the library's Debug configurations. Turning on TreatWarningAsError is a further step that needs src/sniffer.c to build clean at that level first, which was not tested for this advisory.

Integrators who build the sniffer DLL and want stricter diagnostics can change the setting in their copy of the project or apply it from a property sheet. The cost is build breaks when a compiler update adds warnings.

Timeline

  • 2026-09-28 — Reported to wolfSSL.
  • 2026-12-03 — Public disclosure.

Credits

Discovered and reported by Mehrun P. Hunter and Shahriyar Jalayeri of ByteRay Ltd.

References