Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When enable CONFIG_STACK_CANARIES, in general, the stack check in the __gcov_fork function is: " return fork(); 18: e59f3020 ldr r3, [pc, #32] @ 40 <__gcov_fork+0x40> 1c: e5932000 ldr r2, [r3] 20: e59d3004 ldr r3, [sp, #4] 24: e0332002 eors r2, r3, r2 28: e3a03000 mov r3, #0 2c: 1a000002 bne 3c <__gcov_fork+0x3c>" r3 is obtained by taking the value of sp offset. But after opening thumb, the second comparison value in "8c6: 4a06 ldr r2, [pc, #24] @ (8e0 <__gcov_fork+0x30>) 8c8: 6811 ldr r1, [r2, #0] 8ca: 687a ldr r2, [r7, #4] 8cc: 4051 eors r1, r2" is obtained through r7. Since r7 stores the stack address at this time, which stores the address of the parent process, the stack out of bounds will occur in the child process Signed-off-by: wangmingrong1 <[email protected]>
- Loading branch information