Commit 9a7d5a9
cifs: fix possible uninitialized access and race on iface_list
iface[0] was accessed regardless of the count value and without
locking.
* check count before accessing any ifaces
* make copy of iface list (it's a simple POD array) and use it without
locking.
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>1 parent 3345bb4 commit 9a7d5a9
1 file changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
93 | 115 | | |
94 | 116 | | |
95 | 117 | | |
| |||
105 | 127 | | |
106 | 128 | | |
107 | 129 | | |
108 | | - | |
| 130 | + | |
109 | 131 | | |
110 | | - | |
| 132 | + | |
111 | 133 | | |
112 | 134 | | |
113 | 135 | | |
114 | 136 | | |
115 | 137 | | |
116 | 138 | | |
117 | 139 | | |
118 | | - | |
| 140 | + | |
119 | 141 | | |
120 | 142 | | |
121 | 143 | | |
| |||
124 | 146 | | |
125 | 147 | | |
126 | 148 | | |
| 149 | + | |
127 | 150 | | |
128 | 151 | | |
129 | 152 | | |
| |||
0 commit comments