summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorChen Gang2013-04-15 07:34:43 +0200
committerRusty Russell2013-04-15 07:47:26 +0200
commite3f26752f0f8a6aade580115e1e68bcb1a4bc040 (patch)
tree04e818066d7d0faa64abfe55b4841da984f3812f /kernel/module.c
parentMODSIGN: do not send garbage to stderr when enabling modules signature (diff)
downloadkernel-qcow2-linux-e3f26752f0f8a6aade580115e1e68bcb1a4bc040.tar.gz
kernel-qcow2-linux-e3f26752f0f8a6aade580115e1e68bcb1a4bc040.tar.xz
kernel-qcow2-linux-e3f26752f0f8a6aade580115e1e68bcb1a4bc040.zip
kernel: kallsyms: memory override issue, need check destination buffer length
We don't export any symbols > 128 characters, but if we did then kallsyms_expand_symbol() would overflow the buffer handed to it. So we need check destination buffer length when copying. the related test: if we define an EXPORT function which name more than 128. will panic when call kallsyms_lookup_name by init_kprobes on booting. after check the length (provide this patch), it is ok. Implementaion: add additional destination buffer length parameter (maxlen) if uncompressed string is too long (>= maxlen), it will be truncated. not check the parameters whether valid, since it is a static function. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/module.c')
0 files changed, 0 insertions, 0 deletions