Commit f057012
libselinux: limit node depth while parsing compiled fcontexts
Limit the node depth while parsing a pre-compiled fcontext definition to
avoid unlimited recursions causing stack overflows.
Use a sufficiently high value of 32, instead of the node depth of
currently 3 for generating a database, to not unnecessarily limit
custom changes.
Fixes: 92306da ("libselinux: rework selabel_file(5) database")
Reported-by: oss-fuzz (issues 388615595 and 388592303)
Signed-off-by: Christian Göttsche <[email protected]>
Acked-by: James Carter <[email protected]>1 parent b325348 commit f057012
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
677 | | - | |
| 677 | + | |
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
| 681 | + | |
681 | 682 | | |
682 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
683 | 693 | | |
684 | 694 | | |
685 | 695 | | |
| |||
794 | 804 | | |
795 | 805 | | |
796 | 806 | | |
797 | | - | |
| 807 | + | |
798 | 808 | | |
799 | 809 | | |
800 | 810 | | |
| |||
969 | 979 | | |
970 | 980 | | |
971 | 981 | | |
972 | | - | |
| 982 | + | |
973 | 983 | | |
974 | 984 | | |
975 | 985 | | |
| |||
0 commit comments