App denies are skipped for every destination on the DHCP port numbers

Open
#293 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, swift

Research direction

Read Sources/NetExt/FilterDataProvider.swift around lines 318–332 and 578–595 to trace the DHCP port exemption and app-rule matcher; then inspect Sources/Helper/PFManager.swift around lines 343–345 for related policy behavior. Verify that non-DHCP traffic to ports 67, 68, 546, and 547 follows app denies while legitimate address configuration still works, including traffic through a signed filter.

Written by the indexing model from the issue text.

Description

area:netext bug priority:high status:queued type:security

An app deny is skipped solely because the destination port is a DHCP port number. FilterDataProvider.swift:591 checks [67, 68, 546, 547].contains(conn.remotePort), and line 318 returns Allow before the matcher. The branch does not check the transport or destination address. I ran the copied function with a non-local address and live policy origin, and every listed port returned true. Exchanging traffic with a real endpoint through the signed filter still needs checking.

Steps

  1. Save an outgoing deny for an app and deliver the live policy.
  2. Have that app open a connection to a reachable service on port 67, 68, 546 or
  3. The port-only exemption returns Allow before checking the app deny, regardless of whether the service is DHCP.

Where

  • Sources/NetExt/FilterDataProvider.swift:318-332
  • Sources/NetExt/FilterDataProvider.swift:578-595
  • Sources/Helper/PFManager.swift:343-345

Done when: Ordinary non-DHCP traffic to these port numbers follows app rules while legitimate address configuration remains available.

Related: #30, #186

I found this reading the code and haven't reproduced it on a signed build yet: traffic exchange with a non-dhcp endpoint through the signed filter needs checking.

Dominant language
Swift
Stars
49
Forks
5
Avg merge
16h 48m
Merged PRs (30d)
82

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from isaaclins/freesnitch

All issues in isaaclins/freesnitch

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.