#1

fix: hardening — NULL check, max_inode bound, stopAccessing leak

Openkaffeindecafwants to merge intofrom

Summary

3 hardening fixes from W0lfSword deep audit.

Changes

  • bad_query.c:150 — Add NULL guard on path parameter in bad_query_list() (prevent crash)
  • bad_query.c:150 — Clamp max_inode to UINT32_MAX to prevent infinite loop if caller passes INT64_MAX
  • ContentView.swift:111 — Add stopAccessingSecurityScopedResource() via defer (was leaking kernel security-scoped resource handle)

Testing

  • Compiles with Xcode
  • bad_query_list(NULL, 0) returns NULL instead of crashing
  • bad_query_list(path, INT64_MAX) does not hang

Activity

10
sousickyapproved changes3mo ago
forcequitOS2mo ago

Some of these will likely be resolved in a future revision (without 100% vibe-reviewing the code to find things I should fix), thanks I guess, though. I'll close this PR when I get around to updating this repo

fqhlxw5202mo ago

@forcequitOS I have compile this source and run success. Is there any chance not ask open develp mode?

kaffeindecaf2mo ago

Some of these will likely be resolved in a future revision (without 100% vibe-reviewing the code to find things I should fix), thanks I guess, though.

I'll close this PR when I get around to updating this repo

Alright!(sorry for sloppifying everything with deepseek i didnt even know it made a PR😭😭)

sousicky2mo ago

hi

kaffeindecaf2mo ago

hi

hi

sousickyapproved changes2mo ago
sousickyapproved changes2mo ago
sousickyapproved changes1mo ago