Repository navigation
Commit a9208e4
committed
exec: Correct comments about "point of no return"
In commit 221af7f ("Split 'flush_old_exec' into two functions"),
the comment about the point of no return should have stayed in
flush_old_exec() since it refers to "bprm->mm = NULL;" line, but prior
changes in commits c89681e ("remove steal_locks()"), and
fd8328b ("sanitize handling of shared descriptor tables in failing
execve()") made it look like it meant the current->sas_ss_sp line instead.
The comment was referring to the fact that once bprm->mm is NULL, all
failures from a binfmt load_binary hook (e.g. load_elf_binary), will
get SEGV raised against current. Move this comment and expand the
explanation a bit, putting it above the assignment this time, and add
details about the true nature of "point of no return" being the call
to flush_old_exec() itself.
This also removes an erroneous commet about when credentials are being
installed. That has its own dedicated function, install_exec_creds(),
which carries a similar (and correct) comment, so remove the bogus comment
where installation is not actually happening.
Cc: David Howells <dhowells@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Serge Hallyn <serge@hallyn.com>1 parent ddb4a14 commit a9208e4
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
1262 | 1268 | | |
1263 | 1269 | | |
1264 | 1270 | | |
| |||
1286 | 1292 | | |
1287 | 1293 | | |
1288 | 1294 | | |
1289 | | - | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
1290 | 1302 | | |
1291 | 1303 | | |
1292 | 1304 | | |
| |||
1333 | 1345 | | |
1334 | 1346 | | |
1335 | 1347 | | |
1336 | | - | |
1337 | 1348 | | |
1338 | 1349 | | |
1339 | 1350 | | |
| |||
1351 | 1362 | | |
1352 | 1363 | | |
1353 | 1364 | | |
1354 | | - | |
1355 | 1365 | | |
1356 | 1366 | | |
1357 | 1367 | | |
| |||
0 commit comments