1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00
freebsd/sys/geom
Conrad Meyer 5ad33e776f g_part_bsd64: Check for valid on-disk npartitions value
This value is u32 on disk, but assigned to an int in memory.  After we do the
implicit conversion via assignment, check that the result is at least one[1]
(non-negative[2]).

1. The subsequent for-loop iterates from gpt_entries minus one, down, until
   reaching zero.  A negative or zero initial index results in undefined signed
   integer overflow.
2. It is also used to index into arrays later.

In practice, we expected non-malicious disks to contain small positive values.

Reported by:	Coverity
CID:		1223202
Sponsored by:	EMC / Isilon Storage Division
2016-04-26 22:30:54 +00:00
..
bde sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
cache
concat
eli Create the GELIBOOT GEOM_ELI flag 2016-04-08 01:25:25 +00:00
gate g_gate: for pointers replace 0 with NULL. 2016-04-15 16:18:07 +00:00
journal Create an API to reset a struct bio (g_reset_bio). This is mandatory 2016-02-17 17:16:02 +00:00
label Fix off-by-one error in fstyp(8) and geom_label(4) that made them use 2015-06-18 21:55:55 +00:00
linux_lvm
mirror Bump bio_cmd and bio_*flags from 8 bits to 16. 2016-04-14 05:10:41 +00:00
mountver
multipath Prevent g_access calls to bad multipath members 2015-12-15 21:11:41 +00:00
nop Make geom_nop(4) collect statistics on all types of BIOs, not just 2015-10-10 09:03:31 +00:00
part g_part_bsd64: Check for valid on-disk npartitions value 2016-04-26 22:30:54 +00:00
raid sys: extend use of the howmany() macro when available. 2016-04-26 15:38:17 +00:00
raid3 Bump bio_cmd and bio_*flags from 8 bits to 16. 2016-04-14 05:10:41 +00:00
sched Cleanup unnecessary semicolons from the kernel. 2016-04-10 23:07:00 +00:00
shsec
stripe
uzip sys: extend use of the howmany() macro when available. 2016-04-26 15:38:17 +00:00
vinum
virstor
zero
geom_aes.c
geom_bsd_enc.c
geom_bsd.c Remove old ioctl use and support, once and for all. 2015-01-06 05:28:37 +00:00
geom_ccd.c
geom_ctl.c
geom_ctl.h
geom_dev.c Fix early kernel dump via dumpdev env 2015-11-17 20:55:50 +00:00
geom_disk.c DRY on buffer sizes. Update to r298420. 2016-04-21 21:13:41 +00:00
geom_disk.h
geom_dump.c Report withered providers as such alike to GEOMs. 2015-03-26 11:19:24 +00:00
geom_event.c
geom_flashmap.c Teach the flashmap code about the SPI flash. 2016-01-23 05:26:29 +00:00
geom_fox.c
geom_int.h
geom_io.c Bump bio_cmd and bio_*flags from 8 bits to 16. 2016-04-14 05:10:41 +00:00
geom_kern.c Fix multiple incorrect SYSCTL arguments in the kernel: 2014-10-21 07:31:21 +00:00
geom_map.c Fix incorrect error message in geom map 2015-12-27 17:09:23 +00:00
geom_mbr_enc.c
geom_mbr.c
geom_pc98_enc.c
geom_pc98.c
geom_redboot.c
geom_slice.c
geom_slice.h
geom_subr.c Bump bio_cmd and bio_*flags from 8 bits to 16. 2016-04-14 05:10:41 +00:00
geom_sunlabel_enc.c
geom_sunlabel.c
geom_vfs.c
geom_vfs.h
geom_vol_ffs.c
geom.h Create an API to reset a struct bio (g_reset_bio). This is mandatory 2016-02-17 17:16:02 +00:00
notes