Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153488200
D15847.id43877.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
983 B
Referenced Files
None
Subscribers
None
D15847.id43877.diff
View Options
Index: stand/i386/libi386/biosdisk.c
===================================================================
--- stand/i386/libi386/biosdisk.c
+++ stand/i386/libi386/biosdisk.c
@@ -896,10 +896,17 @@
/* GELI needs the offset relative to the partition start */
p_off = alignlba - dskp.start;
- err = geli_read(&dskp, p_off * BD(dev).bd_sectorsize, (u_char *)tmpbuf,
- alignblks * BD(dev).bd_sectorsize);
- if (err)
- return (err);
+ /* Only decrypt reads from inside the encrypted partition boundry */
+ if (dskp.start > 0 && dblk >= dskp.start) {
+ err = geli_read(&dskp, p_off * BD(dev).bd_sectorsize, (u_char *)tmpbuf,
+ alignblks * BD(dev).bd_sectorsize);
+ if (err)
+ return (err);
+ } else {
+ DEBUG("bd_read: Not decrypted read from %lld, outside "
+ "of partition bounds: lower=%llu, upper=%llu\n",
+ dblk, dskp.start, BD(dev).bd_sectors);
+ }
if (tmpbuf != dest) {
bcopy(tmpbuf + diff, dest, blks * BD(dev).bd_sectorsize);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 10:47 AM (14 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31971612
Default Alt Text
D15847.id43877.diff (983 B)
Attached To
Mode
D15847: stand/common/disk.c: Read the partition table relative to the start of the drive
Attached
Detach File
Event Timeline
Log In to Comment