Bug 227635

Summary: Increase MAXPATHLEN value
Product: Base System Reporter: Rodrigo Osorio <rodrigo>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: cem
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 225761    
Attachments:
Description Flags
patch file to increse PATH_MAX none

Description Rodrigo Osorio freebsd_committer freebsd_triage 2018-04-19 12:18:50 UTC
Created attachment 192647 [details]
patch file to increse PATH_MAX

This change can be beneficial for ports like rsync where long path causes buffer overflow see bug #22576
Comment 1 Rodrigo Osorio freebsd_committer freebsd_triage 2018-04-19 12:20:49 UTC
(In reply to Rodrigo Osorio from comment #0)

The bug is is : bug #225761
Comment 2 Conrad Meyer freebsd_committer freebsd_triage 2018-04-19 15:02:15 UTC
This shouldn't be done solely for a piece of broken ports software.  This is a big change, not to mention ABI-breaking.  It can't go to stable/* but the port needs to work on stable/*, presumably.

The supplied patch also isn't sufficient to fix up the fallout (particularly, libc glob allocates a bunch of MAXPATHLEN buffers on the stack, which becomes much worse with a 4kB length).

Here is a little more thorough treatment of the issue: https://reviews.freebsd.org/D12330 (it also bumps MAXNAMLEN from 255 to 1023 — long enough to hold 255 arbitrary Unicode characters in UTF-8).
Comment 3 Conrad Meyer freebsd_committer freebsd_triage 2018-04-19 15:03:43 UTC
This needs arch-level discussion and buy-in; it's not a Bugzilla PR level issue.