Skip to content

Fenrir fixes#478

Open
embhorn wants to merge 20 commits intowolfSSL:masterfrom
embhorn:fenrir-fixes
Open

Fenrir fixes#478
embhorn wants to merge 20 commits intowolfSSL:masterfrom
embhorn:fenrir-fixes

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Apr 2, 2026

  • Fix F-1171 SN_Client_Disconnect_ex check disconnect

  • Fix F-1172 SN_Client_Connect clean

  • Fix F-1595 use word16 instead of int

  • Fix F-1601 check total_len against word16 max

  • Fix F-1174 and F-1175 use force zero

  • Fix F-1173 SN_Client_WillMsgUpdate debug message

  • Fix F-1596 BrokerHandle_Connect packet ID calc

  • Fix F-1597 MqttClient_NetDisconnect resp list cleanup

  • Fix F-1176 BrokerStrCompare portable constant-time compare

  • Fix F-1603 static-mem broker check len

  • Fix F-1604 MqttEncode_Props check max props

  • Fix F-1606 BrokerHandle_Connect static-mem error codes

@embhorn embhorn self-assigned this Apr 2, 2026
Copilot AI review requested due to automatic review settings April 2, 2026 13:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR delivers a batch of targeted robustness and correctness fixes across MQTT-SN, MQTT v5 property encoding, client response lifecycle handling, and broker-side safety checks.

Changes:

  • Adds additional length/overflow guards in MQTT-SN packet encoders/decoders and MQTT v5 property encoding.
  • Fixes several client/broker correctness issues (pending response cleanup, packet-id wrap handling, debug message type, constant-time compare portability).
  • Improves broker-side bounds handling and sensitive-data cleanup (force-zero before free, static-mem length rejection).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
wolfmqtt/mqtt_sn_packet.h Introduces SN_PACKET_MAX_LEN (0xFFFF) to bound MQTT-SN packet lengths.
src/mqtt_sn_packet.c Uses word16 for decoded lengths and enforces max-length checks in multiple MQTT-SN encoders.
src/mqtt_sn_client.c Fixes pending response cleanup on connect failure, corrects a debug print, and conditions disconnect pendResp handling on sleep timer usage.
src/mqtt_packet.c Adds property-list corruption guards and remaining-length bounds checks; adds a publish payload/buffer size check.
src/mqtt_client.c Fixes pending-response list removal loop safety during net disconnect.
src/mqtt_broker.c Improves constant-time compare portability, adds stricter static-mem length checks, enforces out-of-buffer errors instead of truncation in select paths, and force-zeros sensitive data on free.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 2, 2026 14:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 2, 2026 14:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #478

Scan targets checked: wolfmqtt-bugs, wolfmqtt-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants