diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-06-22 09:26:09 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-11 00:35:51 +0400 |
commit | f118e9abddfae94d7ef88858159d7556e1c2f7f6 (patch) | |
tree | f5c58406820460df5083e5352c26cca6b87adac9 /arch/sparc/include | |
parent | bfffbea1aaeeb1eb6500c83ff9653416daa5b490 (diff) | |
download | linux-f118e9abddfae94d7ef88858159d7556e1c2f7f6.tar.xz |
arch: sparc: kernel: check the memory length before use strcpy().
For the related next strcpy(), the destination length is less than 512,
but the source maximize length may be 'OPROMMAXPARAM' (4096) which is
more than 512.
One work flow may:
openprom_sunos_ioctl() -> if (cmd == OPROMSETOPT)
getstrings() -> will alloc buffer with size 'OPROMMAXPARAM'.
opromsetopt() -> devide the buffer into 'var' and 'value'
of_set_property() -> pass
prom_setprop() -> pass
ldom_set_var()
And do not mind the additional 4 alignment buffer increasing, since
'sizeof(pkt) - sizeof(pkt.header)' is 4 alignment at least.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include')
0 files changed, 0 insertions, 0 deletions