Commit d4ac640
staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data()
The "ie_len" is a value in the 1-255 range that comes from the user. We
have to cap it to ensure that it's not too large or it could lead to
memory corruption.
Fixes: 9a7fe54 ("staging: r8188eu: Add source files for new driver - part 1")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YEHyQCrFZKTXyT7J@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 8710751 commit d4ac640
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| 794 | + | |
794 | 795 | | |
795 | 796 | | |
796 | 797 | | |
| |||
811 | 812 | | |
812 | 813 | | |
813 | 814 | | |
| 815 | + | |
814 | 816 | | |
815 | 817 | | |
816 | 818 | | |
| |||
819 | 821 | | |
820 | 822 | | |
821 | 823 | | |
| 824 | + | |
| 825 | + | |
822 | 826 | | |
823 | 827 | | |
824 | 828 | | |
| |||
934 | 938 | | |
935 | 939 | | |
936 | 940 | | |
| 941 | + | |
937 | 942 | | |
938 | 943 | | |
939 | 944 | | |
| |||
0 commit comments