Commit 774c834
committed
ALSA: usb-audio: Fix a DMA to stack memory bug
jira VULN-46737
cve-bf CVE-2024-53197
commit-author Dan Carpenter <[email protected]>
commit f7d306b
upstream-diff Use 5.10 LT commit e7c1fcd
This kernel doesn't have snd_usb_mbox3_boot_quirk(),
so that change hunk from the upstream commit isn't
necessary. Also this kernel doesn't have the __free
annotation, so this version calls kfree the good
old fashioned way
The usb_get_descriptor() function does DMA so we're not allowed
to use a stack buffer for that. Doing DMA to the stack is not portable
all architectures. Move the "new_device_descriptor" from being stored
on the stack and allocate it with kmalloc() instead.
Fixes: b909df1 ("ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices")
Cc: [email protected]
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
(cherry picked from commit f7d306b)
Signed-off-by: Brett Mastbergen <[email protected]>1 parent 663bd76 commit 774c834
1 file changed
+21
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
580 | | - | |
| 580 | + | |
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
591 | 595 | | |
592 | | - | |
| 596 | + | |
593 | 597 | | |
594 | 598 | | |
595 | | - | |
| 599 | + | |
596 | 600 | | |
597 | | - | |
| 601 | + | |
598 | 602 | | |
599 | | - | |
| 603 | + | |
| 604 | + | |
600 | 605 | | |
601 | 606 | | |
602 | 607 | | |
| |||
930 | 935 | | |
931 | 936 | | |
932 | 937 | | |
933 | | - | |
| 938 | + | |
934 | 939 | | |
935 | 940 | | |
936 | 941 | | |
| |||
965 | 970 | | |
966 | 971 | | |
967 | 972 | | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
968 | 977 | | |
969 | | - | |
| 978 | + | |
970 | 979 | | |
971 | 980 | | |
972 | | - | |
| 981 | + | |
973 | 982 | | |
974 | | - | |
| 983 | + | |
975 | 984 | | |
976 | | - | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
977 | 988 | | |
978 | 989 | | |
979 | 990 | | |
| |||
0 commit comments