OPNsense - FreeBSD source
Find a file
John Baldwin 4af849d71f cd9660: Reject volumes with small logical block sizes
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 <rtm@lcs.mit.edu>
Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41228
2023-08-04 16:41:50 -07:00
.cirrus-ci Cirrus-CI: add some timing info on pkg install failure 2021-08-04 15:02:00 -04:00
.github MAINTAINERS: Add myself to stand 2023-05-07 22:30:10 -06:00
bin ls: Improve POSIX compatibility for -g and -n. 2023-07-18 10:03:09 -07:00
cddl dtrace: Add WITH_DTRACE_ASAN 2023-08-02 09:15:08 -04:00
contrib opensm libopensm: remove non-existent symbols from the version map 2023-08-04 02:13:14 +03:00
crypto openssh: retire HPN option handling 2023-08-04 13:29:04 -04:00
etc unzip: swtich to bsdunzip from libarchive 2023-08-04 12:45:41 +02:00
gnu Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
include arm64 lib32: prepare arm64 headers to redirect to arm 2023-07-25 18:59:26 -05:00
kerberos5 kerberos5: Migrate from COMPAT_32BIT to generic COMPAT_LIBCOMPAT 2023-07-09 18:49:21 +01:00
lib pam_krb5: Rename a variable. 2023-08-04 16:08:38 +00:00
libexec libexec: Automatically generate rtld-elf list and generalise TAGS 2023-07-27 05:10:45 +01:00
release release: Fix make :@ modifier syntax 2023-07-27 08:36:12 +01:00
rescue Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
sbin nvmecontrol: fix typos 2023-08-03 12:14:19 +02:00
secure libcrypto: add missing symbols to the FIPS provider 2023-07-20 15:05:12 -04:00
share locale: update to CLDR 43 and Unicode 15 2023-08-04 01:47:16 +02:00
stand kboot: Fix a typo in a source code comment 2023-08-02 11:35:50 +02:00
sys cd9660: Reject volumes with small logical block sizes 2023-08-04 16:41:50 -07:00
targets local.dirdeps.mk skip N_host_libs for non-FreeBSD host 2023-05-04 11:58:39 -07:00
tests pf: test rules evaluation in the face of multiple IPv6 fragment headers 2023-08-04 15:24:16 +02:00
tools OptionalObsoleteFiles: add missed keymaps for sycons 2023-08-04 12:09:08 +02:00
usr.bin unzip: swtich to bsdunzip from libarchive 2023-08-04 12:45:41 +02:00
usr.sbin i2c.8: Fix a typo in the manual page 2023-08-04 13:50:48 +02:00
.arcconfig arcanist: use FreeBSD/git project repository instead of FreeBSD/svn 2022-08-23 14:16:41 +00:00
.arclint
.cirrus.yml Cirrus-CI: use llvm16 job by default and make llvm15 manual 2023-06-22 20:26:34 -04:00
.clang-format clang-format: Add bitset loop macros 2021-09-21 12:08:01 -04:00
.git-blame-ignore-revs Add git-blame ignore file 2023-01-23 15:27:25 -05:00
.gitattributes
.gitignore .gitignore: Ignore LSP generated .cache 2023-03-07 10:04:18 -05:00
CONTRIBUTING.md CONTRIBUTING.md: reinsert double spaces 2023-07-10 12:24:24 -06:00
COPYRIGHT Happy New Year 2023! 2023-01-01 13:44:43 +08:00
LOCKS
MAINTAINERS MAINTAINERS: Add myself to stand 2023-05-07 22:30:10 -06:00
Makefile universe: Demote armv6 to an extra architecture. 2023-07-27 22:30:41 -06:00
Makefile.inc1 Makefile.inc1: Enable requesting the universe toolchain. 2023-08-01 14:01:57 -07:00
Makefile.libcompat Makefile.inc1: Enable requesting the universe toolchain. 2023-08-01 14:01:57 -07:00
Makefile.sys.inc
ObsoleteFiles.inc iflib(9): Remove support for cloning pseudo interfaces 2023-08-03 23:10:18 +02:00
README.md README.md: link to the list of supported platforms 2022-11-01 12:20:55 -03:00
RELNOTES RELNOTES: add a note about lua config files in loader 2023-07-24 23:35:25 -05:00
UPDATING amd64: Bump MAXCPU to 1024 (from 256) 2023-08-03 17:41:26 -04:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.