Repository navigation
Commit 101545f
committed
Bluetooth: Fix potential bad memory access with sysfs files
When creating a high number of Bluetooth sockets (L2CAP, SCO
and RFCOMM) it is possible to scribble repeatedly on arbitrary
pages of memory. Ensure that the content of these sysfs files is
always less than one page. Even if this means truncating. The
files in question are scheduled to be moved over to debugfs in
the future anyway.
Based on initial patches from Neil Brown and Linus Torvalds
Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>1 parent af98441 commit 101545f
4 files changed
Lines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3944 | 3944 | | |
3945 | 3945 | | |
3946 | 3946 | | |
| 3947 | + | |
3947 | 3948 | | |
3948 | 3949 | | |
3949 | 3950 | | |
3950 | 3951 | | |
3951 | 3952 | | |
| 3953 | + | |
3952 | 3954 | | |
3953 | | - | |
| 3955 | + | |
3954 | 3956 | | |
3955 | 3957 | | |
3956 | 3958 | | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
3957 | 3965 | | |
3958 | 3966 | | |
3959 | 3967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2105 | 2105 | | |
2106 | 2106 | | |
2107 | 2107 | | |
| 2108 | + | |
2108 | 2109 | | |
2109 | 2110 | | |
2110 | 2111 | | |
| |||
2113 | 2114 | | |
2114 | 2115 | | |
2115 | 2116 | | |
| 2117 | + | |
2116 | 2118 | | |
2117 | | - | |
| 2119 | + | |
2118 | 2120 | | |
2119 | 2121 | | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
2120 | 2128 | | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
2121 | 2132 | | |
2122 | 2133 | | |
2123 | 2134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1068 | 1068 | | |
1069 | 1069 | | |
1070 | 1070 | | |
| 1071 | + | |
1071 | 1072 | | |
1072 | 1073 | | |
1073 | 1074 | | |
1074 | 1075 | | |
1075 | | - | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1076 | 1079 | | |
1077 | 1080 | | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1078 | 1087 | | |
1079 | 1088 | | |
1080 | 1089 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
| 963 | + | |
963 | 964 | | |
964 | 965 | | |
965 | 966 | | |
966 | 967 | | |
967 | | - | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
968 | 971 | | |
969 | 972 | | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
970 | 979 | | |
971 | 980 | | |
972 | 981 | | |
| |||
0 commit comments