From owner-freebsd-hackers Sun Oct 17 11:46:11 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 61B8714E57 for ; Sun, 17 Oct 1999 11:46:04 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id MAA03338; Sun, 17 Oct 1999 12:46:02 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id MAA04645; Sun, 17 Oct 1999 12:45:38 -0600 (MDT) Message-Id: <199910171845.MAA04645@harmony.village.org> To: Marc Slemko Subject: Re: MAXPATHLEN not enforced Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Sat, 16 Oct 1999 12:20:11 MDT." References: Date: Sun, 17 Oct 1999 12:45:38 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message Marc Slemko writes: : Why does FreeBSD let you create paths longer than MAXPATHLEN? Because this is allowed. : I often have various trees that are as deep as possible for testing various : programs for holes, and I finally figured out why locate wasn't updating its : database properly; it was choking as soon as it saw a path length : >MAXPATHLEN long. The question, however, is why can it see a path length : longer than MAXPATHLEN? MAXPATHLEN is the longest pathname that the kernel system calls can handle, but it isn't the longest pathname that can exist especially due to symbolic links. : I would also wonder if there aren't some security issues resulting : from this. From what gdb shows, locate seems to trash its stack : before spitting out the error about the path being too long... That is an error in the program in question. I do know that the shells on FreeBSD haven't been well audited for buffer overflows. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message