Commit d791896
xfs: avoid LR buffer overrun due to crafted h_len
[ Upstream commit f692d09 ]
Currently, crafted h_len has been blocked for the log
header of the tail block in commit a70f9fe ("xfs:
detect and handle invalid iclog size set by mkfs").
However, each log record could still have crafted h_len
and cause log record buffer overrun. So let's check
h_len vs buffer size for each log record as well.
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 7bd6f89 commit d791896
1 file changed
Lines changed: 19 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2904 | 2904 | | |
2905 | 2905 | | |
2906 | 2906 | | |
2907 | | - | |
| 2907 | + | |
| 2908 | + | |
2908 | 2909 | | |
2909 | 2910 | | |
2910 | 2911 | | |
| |||
2920 | 2921 | | |
2921 | 2922 | | |
2922 | 2923 | | |
2923 | | - | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
2924 | 2928 | | |
2925 | | - | |
| 2929 | + | |
2926 | 2930 | | |
| 2931 | + | |
2927 | 2932 | | |
2928 | 2933 | | |
2929 | 2934 | | |
| |||
2984 | 2989 | | |
2985 | 2990 | | |
2986 | 2991 | | |
2987 | | - | |
2988 | | - | |
2989 | | - | |
2990 | 2992 | | |
2991 | 2993 | | |
2992 | 2994 | | |
| |||
3001 | 3003 | | |
3002 | 3004 | | |
3003 | 3005 | | |
3004 | | - | |
3005 | | - | |
3006 | | - | |
3007 | | - | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
3008 | 3009 | | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
3013 | | - | |
3014 | | - | |
3015 | | - | |
3016 | | - | |
| 3010 | + | |
| 3011 | + | |
3017 | 3012 | | |
3018 | 3013 | | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
3019 | 3018 | | |
3020 | 3019 | | |
3021 | 3020 | | |
| |||
3096 | 3095 | | |
3097 | 3096 | | |
3098 | 3097 | | |
3099 | | - | |
| 3098 | + | |
3100 | 3099 | | |
3101 | 3100 | | |
3102 | 3101 | | |
| |||
3177 | 3176 | | |
3178 | 3177 | | |
3179 | 3178 | | |
3180 | | - | |
| 3179 | + | |
3181 | 3180 | | |
3182 | 3181 | | |
3183 | 3182 | | |
| |||
0 commit comments