Skip to content

Fix use after free and rendering defects in user values - #94

Open
aidangarske wants to merge 15 commits into
wolfSSL:masterfrom
aidangarske:fenrir-fixes-4760-5559-8774
Open

aidangarske wants to merge 15 commits into
wolfSSL:masterfrom
aidangarske:fenrir-fixes-4760-5559-8774

Conversation

@aidangarske

Copy link
Copy Markdown
Member

F-4760 - 7da6837 - KV lookup now takes its reference while the shared lock is still held, closing a use after free window.

F-8774 - a5aae7b - The KV value getters now hold a reference across the unlocked dereference.

F-5559 - a09da94 - KV key validation errors now return without unlocking a lock that is not held.

F-3442 - 7f480f0 - KV rendering now prints 64-bit integers without truncation on targets with a 32-bit long.

F-3195 - 185453f - KV rendering now prints floats with round-trip precision.

F-6511 - 4c4351b - KV rendering now writes non-finite floats as quoted tokens that parse back.

F-4281 - 222f45c - KV rendering now escapes strings when JSON DOM support is not built in.

F-3869 - 02600b7 - A new test covers rejection of overwriting a read-only user value.

F-12517 - b775210 - User value calls now reject empty keys for both explicit and null-terminated lengths.

F-12515 - 58fca82 - A failed user value replacement now keeps the previous value in place.

F-10509 - 02181dd - The user value validator is now read and written atomically, so it cannot race the setter.

F-13288 - f13bebc - The user value validator is now stored on its own table.

F-12553 - 7c7399b - Sentinel string lengths are now bounded in size_t before they are narrowed to int.

…e across the unlocked dereference in the value getters
…idation error without unlocking an unheld lock
…ntegers without truncating on 32-bit-long targets
…r value keys for both explicit and null-terminated lengths
…s user value in place when a replacement fails
…value validator atomically to avoid racing the setter
…tring lengths in size_t before narrowing to int
@aidangarske aidangarske self-assigned this Oct 23, 2026
…ue lengths so the decoded size computation cannot overflow

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #94

Scan targets checked: wolfsentry-src, wolfsentry-bugs
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer

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

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Lite

Comment thread src/kv.c
… round-trip double rendering in the JSON loader

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #94

Scan targets checked: wolfsentry-src, wolfsentry-bugs
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer

No new issues found in the changed files.

💬 1 finding(s) from an earlier review are still open and were not re-posted:

  • %.17g float output can be 24 characters, which the JSON loader rejects — src/kv.c:565

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Lite

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #94

Fenrir already completed a review of this PR at commit 99ab225d5bc5 (run 3483); its findings are the review threads on the PR. Push a new commit to request another review.

@aidangarske
aidangarske marked this pull request as ready for review October 24, 2026 01:44
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.

4 participants