Commit e37e2ff
virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a
pointer to the stack and it will OOPS. Copy the address to the heap
to prevent the crash.
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Laura Abbott <labbott@redhat.com>
Reported-by: zbyszek@in.waw.pl
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent dcb17d2 commit e37e2ff
1 file changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
972 | | - | |
| 972 | + | |
973 | 973 | | |
974 | 974 | | |
975 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
976 | 981 | | |
977 | | - | |
| 982 | + | |
978 | 983 | | |
979 | 984 | | |
980 | 985 | | |
981 | 986 | | |
982 | 987 | | |
983 | 988 | | |
984 | 989 | | |
985 | | - | |
| 990 | + | |
| 991 | + | |
986 | 992 | | |
987 | 993 | | |
988 | 994 | | |
| |||
996 | 1002 | | |
997 | 1003 | | |
998 | 1004 | | |
| 1005 | + | |
999 | 1006 | | |
1000 | | - | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
1001 | 1010 | | |
1002 | 1011 | | |
1003 | 1012 | | |
| |||
0 commit comments