Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177665953
D10559.1794985624.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
786 B
Referenced Files
None
Subscribers
None
D10559.1794985624.diff
View Options
Index: head/sys/boot/efi/libefi/efipart.c
===================================================================
--- head/sys/boot/efi/libefi/efipart.c
+++ head/sys/boot/efi/libefi/efipart.c
@@ -888,6 +888,7 @@
char *blkbuf;
size_t blkoff, blksz;
int error;
+ size_t diskend, readstart;
if (dev == NULL || blk < 0)
return (EINVAL);
@@ -925,7 +926,15 @@
/* make sure we don't read past disk end */
if ((off + size) / blkio->Media->BlockSize > d_offset + disk_blocks) {
- size = d_offset + disk_blocks - off / blkio->Media->BlockSize;
+ diskend = d_offset + disk_blocks;
+ readstart = off / blkio->Media->BlockSize;
+
+ if (diskend <= readstart) {
+ *rsize = 0;
+
+ return (EIO);
+ }
+ size = diskend - readstart;
size = size * blkio->Media->BlockSize;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 18, 7:07 AM (3 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41817690
Default Alt Text
D10559.1794985624.diff (786 B)
Attached To
Mode
D10559: Bug 219000 - Integer underflow in efipart_realstrategy when I/O starts after end of disk
Attached
Detach File
Event Timeline