|
5 | 5 |
|
6 | 6 | [ci]: https://github.com/lrh2000/StackRot/actions |
7 | 7 |
|
| 8 | + |
| 9 | + |
8 | 10 | A flaw was found in the handling of stack expansion in the Linux kernel 6.1 |
9 | 11 | through 6.4, aka "Stack Rot". The maple tree, responsible for managing virtual |
10 | 12 | memory areas, can undergo node replacement without properly acquiring the MM |
@@ -358,12 +360,11 @@ solutions are as follows: |
358 | 360 | period will not end. |
359 | 361 | 4. The iteration task is deliberately prolonged, allowing the RCU grace period |
360 | 362 | to expire. This is the chosen solution. If the current RCU grace period |
361 | | - surpasses RCU_TASK_IPI_DELAY (defaulting to 0.5 seconds), inter-processor |
362 | | - interrupts (IPIs) are dispatched to all CPUs to verify that they are not in |
363 | | - RCU critical sections. In the case of VMA iteration, the answer is |
364 | | - negative, signifying that the RCU grace period concludes and the maple node |
365 | | - is freed, effectively converting UAFBR into a genuine use-after-free (UAF) |
366 | | - scenario. |
| 363 | + surpasses `jiffies_till_first_fqs` (defaulting to several jiffies), an |
| 364 | + inter-processor interrupt (IPI) will be dispatched to the victim CPU and |
| 365 | + trigger voluntary preemption. In the case of VMA iteration, the voluntary |
| 366 | + preemption can make the RCU grace period conclude and free the maple node, |
| 367 | + effectively converting UAFBR into a genuine use-after-free (UAF) scenario. |
367 | 368 |
|
368 | 369 | One significant observation is that during VMA iteration for |
369 | 370 | `/proc/[pid]/maps`, it generates the entire file path for file-mapped memory |
|
0 commit comments