Commit 16451ae
committed
pppd: Be careful not to access beyond end of EAP packets
In the EAP code there are a few places where we could read beyond
the end of the received data in a malformed packet received from the
peer. Because the received packet is in the statically-allocated
inpacket_buf, and because EAP packets can only have a limited number
of fields of limited size, these accesses would be within the bounds
of inpacket_buf, not to unallocated data. Furthermore the data
read were not disclosed to the peer and didn't affect the operation
of pppd beyond being printed in log messages. Hence the security
impact of these accesses is low, and in fact they don't appear to
create any actual vulnerability. Nevertheless it is better to be
careful, so this adds extra checks to make sure we never read beyond
the end of the received data.
Thanks to Kazuma Matsumoto, a security researcher at GMO Cybersecurity
by IERAE, Inc., for finding this.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>1 parent f5a6fb9 commit 16451ae
1 file changed
+36
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1954 | 1954 | | |
1955 | 1955 | | |
1956 | 1956 | | |
1957 | | - | |
1958 | | - | |
1959 | | - | |
| 1957 | + | |
1960 | 1958 | | |
1961 | 1959 | | |
1962 | 1960 | | |
1963 | 1961 | | |
1964 | 1962 | | |
| 1963 | + | |
| 1964 | + | |
1965 | 1965 | | |
1966 | 1966 | | |
1967 | 1967 | | |
| |||
1982 | 1982 | | |
1983 | 1983 | | |
1984 | 1984 | | |
1985 | | - | |
1986 | | - | |
1987 | | - | |
| 1985 | + | |
1988 | 1986 | | |
1989 | 1987 | | |
1990 | 1988 | | |
1991 | 1989 | | |
1992 | 1990 | | |
| 1991 | + | |
| 1992 | + | |
1993 | 1993 | | |
1994 | 1994 | | |
1995 | 1995 | | |
1996 | 1996 | | |
1997 | 1997 | | |
1998 | | - | |
1999 | | - | |
2000 | | - | |
| 1998 | + | |
2001 | 1999 | | |
2002 | 2000 | | |
2003 | 2001 | | |
2004 | 2002 | | |
2005 | 2003 | | |
| 2004 | + | |
| 2005 | + | |
2006 | 2006 | | |
2007 | 2007 | | |
2008 | 2008 | | |
| |||
2196 | 2196 | | |
2197 | 2197 | | |
2198 | 2198 | | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
2199 | 2204 | | |
2200 | 2205 | | |
2201 | 2206 | | |
2202 | 2207 | | |
2203 | | - | |
| 2208 | + | |
2204 | 2209 | | |
2205 | 2210 | | |
2206 | 2211 | | |
| |||
2622 | 2627 | | |
2623 | 2628 | | |
2624 | 2629 | | |
2625 | | - | |
2626 | | - | |
2627 | | - | |
2628 | | - | |
2629 | 2630 | | |
2630 | | - | |
2631 | | - | |
2632 | | - | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
2633 | 2635 | | |
2634 | 2636 | | |
2635 | 2637 | | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
2636 | 2641 | | |
2637 | 2642 | | |
2638 | 2643 | | |
| |||
3010 | 3015 | | |
3011 | 3016 | | |
3012 | 3017 | | |
3013 | | - | |
3014 | | - | |
3015 | 3018 | | |
3016 | 3019 | | |
3017 | 3020 | | |
3018 | 3021 | | |
3019 | 3022 | | |
3020 | 3023 | | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
3021 | 3028 | | |
3022 | 3029 | | |
3023 | 3030 | | |
| |||
3075 | 3082 | | |
3076 | 3083 | | |
3077 | 3084 | | |
| 3085 | + | |
| 3086 | + | |
3078 | 3087 | | |
3079 | 3088 | | |
3080 | 3089 | | |
| |||
3100 | 3109 | | |
3101 | 3110 | | |
3102 | 3111 | | |
| 3112 | + | |
| 3113 | + | |
3103 | 3114 | | |
3104 | 3115 | | |
3105 | 3116 | | |
3106 | 3117 | | |
3107 | 3118 | | |
3108 | 3119 | | |
3109 | 3120 | | |
| 3121 | + | |
| 3122 | + | |
3110 | 3123 | | |
3111 | 3124 | | |
3112 | 3125 | | |
3113 | 3126 | | |
3114 | 3127 | | |
3115 | 3128 | | |
3116 | 3129 | | |
| 3130 | + | |
| 3131 | + | |
3117 | 3132 | | |
3118 | 3133 | | |
3119 | 3134 | | |
| |||
3317 | 3332 | | |
3318 | 3333 | | |
3319 | 3334 | | |
| 3335 | + | |
| 3336 | + | |
3320 | 3337 | | |
3321 | 3338 | | |
3322 | 3339 | | |
| |||
0 commit comments