Messages in this thread | | | Date | Mon, 14 Dec 2015 13:07:31 +0100 | From | NITU Vlad <> | Subject | Possible bug in call usermodehelper |
| |
Hello all,
I'm trying to execute a user-space binary from a IRQ context so I started form this module which execute the reboot command. If I adapt this code to execute command with parameters I see that it silently fail. I specify that I use 3.12.47 kernel version. When I started digging into the kernel I figured out that __call_usermodehelper(struct work_struct *work) try to retrieve back the subprocess_info structure using
struct subprocess_info *sub_info = container_of(work, struct subprocess_info, work);
I think that there is a problem with this retrieving because sub_info->argv now contains weird values:
argv and envp in my module:
argv[0] = "/usr/local/sbin/xl"; argv[1] = "migrate"; argv[2] = "ubuntu"; argv[3] = "192.168.0.230"; envp[0] = "HOME=/"; envp[1] = "PWD=/"; envp[2] = "PATH=/usr/local/sbin/xl"; envp[3] = NULL;
argv and envp in __call_usermodehelper
argv[0] = \xffffff90\xffffff9e.\x02\x02\xffffff88\xffffffff\xffffffff\xffffff90\xffffff9e.\x02\x02\xffffff88\xffffffff\xffffffff\xffffff80\xffffffbc\n\t"\x02\xffffff88\xffffffff\xffffffff the others have similar values to argv[0]
Best regards, Nitu Vlad-Tiberiu
| |