Article 5DRV9 Can't get argv from bprm_check_security: is the documentation incorrect ?

Can't get argv from bprm_check_security: is the documentation incorrect ?

by
0xCAFE
from LinuxQuestions.org on (#5DRV9)
Hi everybody,

I'm facing an issue and I don't know whether the issue comes from the documentation or because I missed something.

Indeed, according to Linux Kernel's doc:

Quote:
bprm_check_security [...] The argv list and envp list are reliably available in bprm. [...]
However, the value of argv and envp (e.g. bprm->mm->arg_start) are actually NULL at this point. This is due to the fact these values are setup in setup_arg_pages which is called after the hook. Additionnally at this point of time current still points to the old thread and not the new one, thus I cannot get the argument this way either

So my question is: Is the documentation incorrect or is there an alternate way to reliably get the arguments at this point?

Tell me if you need further informations :)

Thank you for your help!latest?d=yIl2AUoC8zA latest?i=vPcicvd3kDU:G-mGVOW34cE:F7zBnMy latest?i=vPcicvd3kDU:G-mGVOW34cE:V_sGLiP latest?d=qj6IDK7rITs latest?i=vPcicvd3kDU:G-mGVOW34cE:gIN9vFwvPcicvd3kDU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments