Bug 227635 - Increase MAXPATHLEN value
Summary: Increase MAXPATHLEN value
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks: 225761
  Show dependency treegraph
 
Reported: 2018-04-19 12:18 UTC by Rodrigo Osorio
Modified: 2018-04-19 15:03 UTC (History)
1 user (show)

See Also:


Attachments
patch file to increse PATH_MAX (508 bytes, patch)
2018-04-19 12:18 UTC, Rodrigo Osorio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo Osorio freebsd_committer 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 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 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 2018-04-19 15:03:43 UTC
This needs arch-level discussion and buy-in; it's not a Bugzilla PR level issue.