Commit c77d08a
committed
Harden system calls plus.
This does the things that I asked @drdrew42 to address in openwebwork#1392. Since
@drdrew42 seems to not have time to deal with that (due to the lack of
response to my comments) I am opening this pull request.
This also addresses the fourth security vulnerability that @drdrew42
mentioned in the Slack securityresponseteam channel. Basically, it only
allows symlinks to be created to a file that is in the
`$WeBWorK::PG::IO::pg_envir->{directories}{permitted_read_dir}`.
That does allow following symlinks, so for webwork2 that includes
anything in or linked to in the course directory. That means OPL static
image files will work, or files in the
`webwork2/assets/pg/Student_Orientation` directory (for example). One
case that was allowed before that this doesn't allow is a file in the
`webwork2/htdocs/images` directory. I don't really see a need to allow
those files though.
For the standalone renderer that is the root directory of the standalone
renderer app (by default).
This could be considered for a hotfix as @drdrew42 mentioned in openwebwork#1392.1 parent c379851 commit c77d08a
2 files changed
Lines changed: 53 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
39 | 62 | | |
40 | 63 | | |
41 | 64 | | |
| |||
277 | 300 | | |
278 | 301 | | |
279 | 302 | | |
280 | | - | |
281 | | - | |
| 303 | + | |
| 304 | + | |
282 | 305 | | |
283 | | - | |
284 | | - | |
| 306 | + | |
285 | 307 | | |
286 | 308 | | |
287 | 309 | | |
| |||
294 | 316 | | |
295 | 317 | | |
296 | 318 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
314 | 325 | | |
315 | 326 | | |
316 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
249 | 257 | | |
250 | | - | |
251 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
252 | 262 | | |
253 | 263 | | |
254 | 264 | | |
| |||
270 | 280 | | |
271 | 281 | | |
272 | 282 | | |
273 | | - | |
| 283 | + | |
274 | 284 | | |
275 | 285 | | |
276 | 286 | | |
| |||
0 commit comments