Commit 5ab542e
Samuel FORESTIER
Manually resolves paths derived from root_dir to prevent rootfs escape
This patch is a followup of #311.
It appeared that we were not resolving paths when reading from files.
This means that a symbolic link present under `root_dir` could be
blindly followed _outside_ of `root_dir`, possibly leading to host own
materials.1 parent 65eda6f commit 5ab542e
File tree
3 files changed
+35
-0
lines changed- src/distro
- tests
- resources/testdistros/distro/dontfollowsymlinks/etc
3 files changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
744 | 745 | | |
745 | 746 | | |
746 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
747 | 751 | | |
748 | 752 | | |
749 | 753 | | |
| |||
791 | 795 | | |
792 | 796 | | |
793 | 797 | | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
794 | 805 | | |
795 | 806 | | |
796 | 807 | | |
| |||
808 | 819 | | |
809 | 820 | | |
810 | 821 | | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
811 | 838 | | |
812 | 839 | | |
813 | 840 | | |
| |||
1271 | 1298 | | |
1272 | 1299 | | |
1273 | 1300 | | |
| 1301 | + | |
1274 | 1302 | | |
1275 | 1303 | | |
1276 | 1304 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
704 | 710 | | |
705 | 711 | | |
706 | 712 | | |
| |||
0 commit comments