LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-04-2021, 02:04 PM   #1
0xCAFE
LQ Newbie
 
Registered: Feb 2021
Posts: 2

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


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!
 
Old 02-07-2021, 03:16 AM   #2
0xCAFE
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Original Poster
Rep: Reputation: Disabled
Since I go no answer, I'm taking the liberty to bump this thread.

If you think I should add any data to clarify my point (traces, which data is ready a which point of bprm execution, ...), I can do it.

Also, if I may, do you think I didn't get any answer due to bad luck, because my question was on a too specifical topic or because you did not find it interesting?

THank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Plain Old Documentation (pod) – write documentation for Perl, Perl software, and Perl modules LXer Syndicated Linux News 0 10-05-2018 09:12 AM
[SOLVED] How to declare char[strlen(argv[i])]; when values are not get known? BW-userx Programming 1 07-27-2017 10:25 AM
[SOLVED] int main(int argc, char **argv[]) having trouble getting value out of array argv[ ] C programming. BW-userx Programming 57 04-25-2017 07:18 PM
C programming linux copying argv to wchar_t argv babbab Programming 1 08-09-2012 05:32 AM
Incorrect Mouse, Incorrect Keymap, and Trapped in X Kenji Miyamoto Debian 8 08-24-2005 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration