Re: [PATCH] Fix kobject uevent string handling errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 25, 2007 at 12:17:54AM -0400, Mathieu Desnoyers wrote:
> Fix kobject uevent string handling errors
> 
> - increment env->buflen in dmi-id.c
> - fix off-by-one in add_uevent_var in error checking of vsnprintf
> - add warnings when add_uevent_var. Proper handling of its return values should
>   really be done by the callers, but they aren't, so things currently
>   fail silently. This is why I add warnings.

Ah, thanks, but Kay just sent me an updated version with portions of
this fix in it already.

Thanks a lot for helping us track this all down, hopefully the scsi
layer isn't still overflowing the buffer :(

> -	if (env->envp_idx >= ARRAY_SIZE(env->envp))
> +	if (env->envp_idx >= ARRAY_SIZE(env->envp)) {
> +		printk("add_uevent_var: too small array size %u %u\n",
> +			env->envp_idx, ARRAY_SIZE(env->envp));
> +		WARN_ON(1);

printk's always need a KERN_level.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux