Commit 2217b98
binfmt_flat: revert "binfmt_flat: don't offset the data start"
binfmt_flat loader uses the gap between text and data to store data
segment pointers for the libraries. Even in the absence of shared
libraries it stores at least one pointer to the executable's own data
segment. Text and data can go back to back in the flat binary image and
without offsetting data segment last few instructions in the text
segment may get corrupted by the data segment pointer.
Fix it by reverting commit a235722 ("binfmt_flat: don't offset the
data start").
Cc: stable@vger.kernel.org
Fixes: a235722 ("binfmt_flat: don't offset the data start")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>1 parent d012a71 commit 2217b98
1 file changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
579 | | - | |
| 579 | + | |
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
| |||
620 | 622 | | |
621 | 623 | | |
622 | 624 | | |
623 | | - | |
| 625 | + | |
624 | 626 | | |
625 | 627 | | |
626 | 628 | | |
| |||
635 | 637 | | |
636 | 638 | | |
637 | 639 | | |
638 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
639 | 643 | | |
640 | 644 | | |
641 | 645 | | |
| |||
652 | 656 | | |
653 | 657 | | |
654 | 658 | | |
655 | | - | |
656 | | - | |
657 | | - | |
| 659 | + | |
| 660 | + | |
658 | 661 | | |
659 | 662 | | |
660 | 663 | | |
| |||
710 | 713 | | |
711 | 714 | | |
712 | 715 | | |
713 | | - | |
| 716 | + | |
| 717 | + | |
714 | 718 | | |
715 | 719 | | |
716 | 720 | | |
| |||
0 commit comments