Commit b1e25a3
bpf: Add hash chain signature support for arbitrary maps
This patch introduces hash chain support for signature verification of
arbitrary bpf map objects which was described here:
https://lore.kernel.org/linux-security-module/[email protected]/
The UAPI is extended to allow for in-kernel checking of maps passed in
via the fd_array. A hash chain is constructed from the maps, in order
specified by the signature_maps field. The hash chain is terminated
with the hash of the program itself.
Tested-by: [email protected]
Signed-off-by: Blaise Boscaccy <[email protected]>1 parent c395c15 commit b1e25a3
3 files changed
+81
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1621 | 1621 | | |
1622 | 1622 | | |
1623 | 1623 | | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1624 | 1630 | | |
1625 | 1631 | | |
1626 | 1632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2802 | 2802 | | |
2803 | 2803 | | |
2804 | 2804 | | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
2805 | 2820 | | |
2806 | 2821 | | |
2807 | 2822 | | |
2808 | 2823 | | |
2809 | | - | |
| 2824 | + | |
| 2825 | + | |
2810 | 2826 | | |
2811 | 2827 | | |
| 2828 | + | |
| 2829 | + | |
2812 | 2830 | | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
2813 | 2834 | | |
2814 | 2835 | | |
2815 | 2836 | | |
| |||
2830 | 2851 | | |
2831 | 2852 | | |
2832 | 2853 | | |
2833 | | - | |
2834 | | - | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
2835 | 2896 | | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
2836 | 2901 | | |
2837 | 2902 | | |
2838 | 2903 | | |
2839 | 2904 | | |
2840 | 2905 | | |
2841 | 2906 | | |
2842 | | - | |
| 2907 | + | |
2843 | 2908 | | |
2844 | 2909 | | |
2845 | 2910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1621 | 1621 | | |
1622 | 1622 | | |
1623 | 1623 | | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1624 | 1630 | | |
1625 | 1631 | | |
1626 | 1632 | | |
| |||
0 commit comments