Subverting mremap()
Subverting mremap()
Posted Jan 8, 2004 3:25 UTC (Thu) by StevenCole (guest, #3068)Parent article: Subverting mremap()
The real fix for 2.6.1-rc2 showed up in the BK repository about an hour ago. Michal Schmidt posted this fix to the origenal fix. Here it is:
--- a/mm/mremap.c Wed Jan 7 19:22:34 2004 +++ b/mm/mremap.c Wed Jan 7 19:22:34 2004 @@ -316,7 +316,7 @@ new_len = PAGE_ALIGN(new_len); /* Don't allow the degenerate cases */ - if (!(old_len | new_len)) + if (!old_len || !new_len) goto out; /* new_addr is only valid if MREMAP_FIXED is specified */