Commit 9e3041f
ocfs2: add bounds checking to ocfs2_xattr_find_entry()
Add a paranoia check to make sure it doesn't stray beyond valid memory
region containing ocfs2 xattr entries when scanning for a match. It will
prevent out-of-bound access in case of crafted images.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Ferry Meng <[email protected]>
Signed-off-by: Joseph Qi <[email protected]>
Reported-by: lei lu <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 82a9d6b commit 9e3041f
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1062 | 1062 | | |
1063 | 1063 | | |
1064 | 1064 | | |
1065 | | - | |
| 1065 | + | |
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
| |||
1076 | 1076 | | |
1077 | 1077 | | |
1078 | 1078 | | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
1079 | 1083 | | |
1080 | 1084 | | |
1081 | 1085 | | |
| |||
1166 | 1170 | | |
1167 | 1171 | | |
1168 | 1172 | | |
1169 | | - | |
| 1173 | + | |
1170 | 1174 | | |
1171 | 1175 | | |
1172 | 1176 | | |
| |||
2698 | 2702 | | |
2699 | 2703 | | |
2700 | 2704 | | |
2701 | | - | |
| 2705 | + | |
2702 | 2706 | | |
2703 | 2707 | | |
2704 | 2708 | | |
| |||
2833 | 2837 | | |
2834 | 2838 | | |
2835 | 2839 | | |
2836 | | - | |
| 2840 | + | |
2837 | 2841 | | |
2838 | 2842 | | |
2839 | 2843 | | |
| |||
0 commit comments