Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111158222
D19688.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
798 B
Referenced Files
None
Subscribers
None
D19688.diff
View Options
Index: head/sys/vm/vm_map.c
===================================================================
--- head/sys/vm/vm_map.c
+++ head/sys/vm/vm_map.c
@@ -1673,11 +1673,12 @@
(max_addr == 0 || max_addr > MAP_32BIT_MAX_ADDR) ?
aslr_pages_rnd_64[pidx] : aslr_pages_rnd_32[pidx];
if (vm_map_findspace(map, curr_min_addr, length +
- gap * pagesizes[pidx], addr) ||
- (max_addr != 0 && *addr + length > max_addr))
+ gap * pagesizes[pidx], addr))
goto again;
/* And randomize the start address. */
*addr += (arc4random() % gap) * pagesizes[pidx];
+ if (max_addr != 0 && *addr + length > max_addr)
+ goto again;
} else if (vm_map_findspace(map, curr_min_addr, length, addr) ||
(max_addr != 0 && *addr + length > max_addr)) {
if (cluster) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 5:20 AM (18 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16898528
Default Alt Text
D19688.diff (798 B)
Attached To
Mode
D19688: ASLR: check for max_addr after applying randomization, not before.
Attached
Detach File
Event Timeline
Log In to Comment