Commit c3d39f0
committed
feat(pathfinder): add CTK-root canary fallback to find_nvidia_binary_utility
After the deterministic search over the explicit trusted directories (NVIDIA
wheel bin/, CONDA_PREFIX, CUDA_HOME/CUDA_PATH) misses, fall back to a CTK-root
canary probe: resolve cudart through the OS dynamic loader, which honors
LD_LIBRARY_PATH on Linux and the native DLL search on Windows, derive the CUDA
Toolkit root from its absolute path, and search that root's bin layout.
This addresses the concern raised on #2196: users who follow the CUDA Linux
installation guide set LD_LIBRARY_PATH for libraries and PATH for executables.
The bounded finder alone would stop finding the utility for them because PATH
is intentionally never consulted. The canary fallback recovers that case
through LD_LIBRARY_PATH instead of PATH. LD_LIBRARY_PATH is still an attack
vector, but a significantly harder one to exploit than PATH, and the ambient
PATH and process CWD remain unused.
The canary runs only after the explicit trusted dirs miss, so the common
wheel/conda/CUDA_HOME cases never spawn the resolver subprocess. The
canary -> CTK-root resolution is factored into a shared
resolve_ctk_root_via_canary helper reused by the dynamic-library CTK-root
canary flow.
Adds tests for the fallback (found, ordering, Windows bin layout, not
consulted when found earlier, cached) and for resolve_ctk_root_via_canary.
Adds 1.6.0 release notes for the minor version bump.1 parent 72366a8 commit c3d39f0
5 files changed
Lines changed: 206 additions & 12 deletions
File tree
- cuda_pathfinder
- cuda/pathfinder
- _binaries
- _dynamic_libs
- docs/source/release
- tests
Lines changed: 58 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| |||
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
44 | 78 | | |
45 | 79 | | |
46 | 80 | | |
| |||
99 | 133 | | |
100 | 134 | | |
101 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
102 | 145 | | |
103 | 146 | | |
104 | 147 | | |
| |||
107 | 150 | | |
108 | 151 | | |
109 | 152 | | |
110 | | - | |
111 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
112 | 156 | | |
113 | 157 | | |
114 | 158 | | |
| |||
135 | 179 | | |
136 | 180 | | |
137 | 181 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 182 | + | |
142 | 183 | | |
143 | 184 | | |
144 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
139 | 154 | | |
140 | 155 | | |
141 | 156 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 157 | + | |
146 | 158 | | |
147 | 159 | | |
148 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
372 | 402 | | |
373 | 403 | | |
374 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| |||
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
156 | 225 | | |
157 | 226 | | |
158 | 227 | | |
| |||
166 | 235 | | |
167 | 236 | | |
168 | 237 | | |
| 238 | + | |
169 | 239 | | |
170 | 240 | | |
171 | 241 | | |
| |||
186 | 256 | | |
187 | 257 | | |
188 | 258 | | |
| 259 | + | |
189 | 260 | | |
190 | 261 | | |
191 | 262 | | |
| |||
206 | 277 | | |
207 | 278 | | |
208 | 279 | | |
| 280 | + | |
209 | 281 | | |
210 | 282 | | |
211 | 283 | | |
212 | 284 | | |
213 | 285 | | |
214 | 286 | | |
215 | 287 | | |
216 | | - | |
| 288 | + | |
| 289 | + | |
217 | 290 | | |
| 291 | + | |
218 | 292 | | |
219 | 293 | | |
220 | 294 | | |
| |||
0 commit comments