lkml.org 
[lkml]   [2015]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPossible 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



\
 
 \ /
  Last update: 2015-12-14 13:41    [W:0.024 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site