Skip to content

fix: hardening — NULL check, max_inode bound, stopAccessing leak - #1

Open
kaffeindecaf wants to merge 1 commit into
forcequitOS:mainfrom
kaffeindecaf:main
Open

fix: hardening — NULL check, max_inode bound, stopAccessing leak#1
kaffeindecaf wants to merge 1 commit into
forcequitOS:mainfrom
kaffeindecaf:main

Conversation

@kaffeindecaf

Copy link
Copy Markdown

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

- bad_query_list: add NULL path check and clamp max_inode to UINT32_MAX
- ContentView.swift: add stopAccessingSecurityScopedResource via defer
  (was leaking kernel security-scoped resource)
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.

2 participants