Commit 206c8e2
xen/netfront: react properly to failing gnttab_end_foreign_access_ref()
Commit 66e3531 upstream.
When calling gnttab_end_foreign_access_ref() the returned value must
be tested and the reaction to that value should be appropriate.
In case of failure in xennet_get_responses() the reaction should not be
to crash the system, but to disable the network device.
The calls in setup_netfront() can be replaced by calls of
gnttab_end_foreign_access(). While at it avoid double free of ring
pages and grant references via xennet_disconnect_backend() in this case.
This is CVE-2022-23042 / part of XSA-396.
Reported-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 39c00d0 commit 206c8e2
1 file changed
Lines changed: 31 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
993 | | - | |
994 | 993 | | |
995 | 994 | | |
996 | 995 | | |
| |||
1032 | 1031 | | |
1033 | 1032 | | |
1034 | 1033 | | |
1035 | | - | |
1036 | | - | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1037 | 1041 | | |
1038 | 1042 | | |
1039 | 1043 | | |
| |||
1254 | 1258 | | |
1255 | 1259 | | |
1256 | 1260 | | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1257 | 1265 | | |
1258 | 1266 | | |
1259 | 1267 | | |
| |||
1918 | 1926 | | |
1919 | 1927 | | |
1920 | 1928 | | |
1921 | | - | |
| 1929 | + | |
1922 | 1930 | | |
1923 | 1931 | | |
1924 | 1932 | | |
| |||
1938 | 1946 | | |
1939 | 1947 | | |
1940 | 1948 | | |
1941 | | - | |
| 1949 | + | |
1942 | 1950 | | |
1943 | 1951 | | |
1944 | 1952 | | |
1945 | 1953 | | |
1946 | 1954 | | |
1947 | 1955 | | |
1948 | | - | |
| 1956 | + | |
1949 | 1957 | | |
1950 | 1958 | | |
1951 | 1959 | | |
1952 | 1960 | | |
1953 | 1961 | | |
1954 | 1962 | | |
1955 | | - | |
| 1963 | + | |
1956 | 1964 | | |
1957 | 1965 | | |
1958 | 1966 | | |
| |||
1965 | 1973 | | |
1966 | 1974 | | |
1967 | 1975 | | |
1968 | | - | |
| 1976 | + | |
1969 | 1977 | | |
1970 | 1978 | | |
1971 | 1979 | | |
1972 | 1980 | | |
1973 | 1981 | | |
1974 | 1982 | | |
1975 | | - | |
1976 | | - | |
1977 | | - | |
1978 | | - | |
1979 | | - | |
1980 | | - | |
1981 | | - | |
1982 | | - | |
1983 | | - | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
1984 | 1998 | | |
1985 | 1999 | | |
1986 | 2000 | | |
| |||
0 commit comments