<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/fs/cd9660, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F13</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F13'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-04-07T15:52:56Z</updated>
<entry>
<title>cd9660: Add length checks to Rock Ridge parser</title>
<updated>2026-04-07T15:52:56Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2026-04-01T17:14:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b3bf8410a56260bc0f26b5197b3c8764f3283e9d'/>
<id>urn:sha1:b3bf8410a56260bc0f26b5197b3c8764f3283e9d</id>
<content type='text'>
* cd9660_rrip_slink() did not check that the lengths of individual
  entries do not exceed the length of the overall record.

* cd9660_rrip_altname() did not check that the length of the record
  was at least 5 before subtracting 5 from it.

Note that in both cases, a better solution would be to check the length
of the data before calling the handler, or immediately upon entry of
the handler, but this would require significant refactoring.

MFC after:	1 week
Reported by:	Calif.io in collaboration with Claude and Anthropic Research
Reported by:	Adam Crosser, Praetorian
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56215

(cherry picked from commit d0afead876076f605c363f03d92304d1bd75be1c)
</content>
</entry>
<entry>
<title>namei: Fix cn_flags width in various places</title>
<updated>2025-11-19T20:47:50Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-05-27T13:29:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=503ab844ceced16c7e8736c0caa586ff0bab5f0e'/>
<id>urn:sha1:503ab844ceced16c7e8736c0caa586ff0bab5f0e</id>
<content type='text'>
This truncation is mostly harmless today, but fix it anyway to avoid
pain later down the road.

Reviewed by:	olce, kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50417

(cherry picked from commit 0d224af399a66f00a5b33e5512fc018062cabf1d)
</content>
</entry>
<entry>
<title>cd9660: Unbreak symbolic links</title>
<updated>2025-11-14T14:43:53Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-11-10T13:58:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3e8d5f36082414373462743d775db005daf07339'/>
<id>urn:sha1:3e8d5f36082414373462743d775db005daf07339</id>
<content type='text'>
Since the introduction of permission masks, cd9660_getattr() returns a
size of zero for all symbolic links, because the code to retrieve the
length of the link target (as required by POSIX) is dead, since we strip
away the type bits before we try to use them to identify the file as a
link.  Address this by checking the vnode type instead.

PR:		290556
MFC after:	3 days
Fixes:		82f2275b73e5 ("cd9660: Add support for mask,dirmask,uid,gid options")
Reviewed by:	olce
Differential Revision:	https://reviews.freebsd.org/D53598

(cherry picked from commit 978aaa72f3196f5489630052762cac5a7863e774)
</content>
</entry>
<entry>
<title>cd9660: Apply the file and directory mode masks bits to all 12 access bits</title>
<updated>2024-12-27T15:51:01Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-12-06T22:40:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9263f003185035cf286eb0257c1fea9f703c5f93'/>
<id>urn:sha1:9263f003185035cf286eb0257c1fea9f703c5f93</id>
<content type='text'>
This permits the mask bits to control the upper 3 bits used for setuid,
setgid, and sticky permissions.  While here, clarify the manpage language
as non-Rockridge volumes with extended attributes can also supply users
and groups along with permissions.

Reviewed by:	olce
Fixes:		82f2275b73e5 cd9660: Add support for mask,dirmask,uid,gid options
Differential Revision:	https://reviews.freebsd.org/D47357

(cherry picked from commit c1ad5b4b10c5e426d3d782b7216a038187419a1e)
</content>
</entry>
<entry>
<title>cd9660: Make sure that struct ifid fits in generic filehandle structure</title>
<updated>2024-12-13T01:39:46Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2024-12-06T02:03:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cd597b4bb194f7a0bd756b5299b40ad3607b1baf'/>
<id>urn:sha1:cd597b4bb194f7a0bd756b5299b40ad3607b1baf</id>
<content type='text'>
File system specific *fid structures are copied into the generic
struct fid defined in sys/mount.h.
As such, they cannot be larger than struct fid.

This patch packs the structure and checks via a __Static_assert().

Reported by:	Kevin Miller &lt;mas@0x194.net&gt;
Reviewed by:	olce, imp, kib, emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D47879

(cherry picked from commit 205659c43d87bd42c4a0819fde8f81e8ebba068e)
</content>
</entry>
<entry>
<title>cd9660: Add support for mask,dirmask,uid,gid options</title>
<updated>2024-04-08T17:29:11Z</updated>
<author>
<name>Ricardo Branco</name>
<email>rbranco@suse.de</email>
</author>
<published>2024-01-08T20:24:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=470de7a717fc1c5954f1196c1d10b96fd9f2d524'/>
<id>urn:sha1:470de7a717fc1c5954f1196c1d10b96fd9f2d524</id>
<content type='text'>
Reviewed by:	jhb
Pull Request:	https://github.com/freebsd/freebsd-src/pull/982

(cherry picked from commit 82f2275b73e556580b155ea9bbf7f7e364458fa1)
</content>
</entry>
<entry>
<title>cd9660: Reject volumes with small logical block sizes</title>
<updated>2023-09-06T21:56:10Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2023-08-04T23:41:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=983819d217999303770876885250e70a89ad2687'/>
<id>urn:sha1:983819d217999303770876885250e70a89ad2687</id>
<content type='text'>
ISO9660 permits specifying a logical block size that is any power of 2
greater than or equal to 512.  The geom disk layer requires requests
to be aligned on sector boundaries of the provider.  With a volume
that uses a logical block size smaller than the underlying disk sector
size (e.g. a logical block size of 512 or 1024 on a CD which uses 2048
byte sectors), the current cd9660 vfs can issue requests for partial
sectors, or on non-sector boundaries.

Fixing this properly would require wrapping all of the calls to
bread*/bwrite* in cd9660 vfs to roundup requests to be on sector
boundaries which can include both the length, but also the starting
sector number (and thus requiring use of an offset relative to b_data
in the resulting buf).

These images do not seem to be common however given that no one has
fixed this in cd9660's vfs in the past few decades, so just reject
them during mount with an error.  If such images are found to be used
in the wild in practice, then the larger fix can be applied.

PR:		258063
Reported by:	Robert Morris &lt;rtm@lcs.mit.edu&gt;
Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41228

(cherry picked from commit 4af849d71f69306432941d91fa46c3c303059d63)
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line bare tag</title>
<updated>2023-08-23T17:43:32Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:32:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=27096e41f03f81fd6622e45ec3a91268f0eacdc8'/>
<id>urn:sha1:27096e41f03f81fd6622e45ec3a91268f0eacdc8</id>
<content type='text'>
Remove /^\s*\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 78d146160dc5)
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-23T17:43:27Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5510f79042fbd543de55807d0da7f8a2b8be2f89'/>
<id>urn:sha1:5510f79042fbd543de55807d0da7f8a2b8be2f89</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in current:
(cherry picked from commit 031beb4e239b)
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-23T17:43:25Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3bc80996974a61a4223eae4c1ccd47b6ee32a48a'/>
<id>urn:sha1:3bc80996974a61a4223eae4c1ccd47b6ee32a48a</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in current:
(cherry picked from commit 685dc743dc3b)
</content>
</entry>
</feed>
