Commit 46f8a29
vduse: prevent uninitialized memory accesses
If the VDUSE application provides a smaller config space
than the driver expects, the driver may use uninitialized
memory from the stack.
This patch prevents it by initializing the buffer passed by
the driver to store the config value.
This fix addresses CVE-2022-2308.
Cc: [email protected] # v5.15+
Fixes: c8a6153 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Reviewed-by: Xie Yongji <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Maxime Coquelin <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>1 parent 37fafe6 commit 46f8a29
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
677 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
678 | 680 | | |
679 | 681 | | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
680 | 685 | | |
681 | 686 | | |
682 | 687 | | |
| |||
0 commit comments