Re: [PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-01-13 Thread Greg Kroah-Hartman
On Fri, Dec 27, 2013 at 08:10:27PM +0100, Ben Hutchings wrote: > On Fri, 2013-12-27 at 10:47 -0800, Greg Kroah-Hartman wrote: > > On Fri, Dec 27, 2013 at 06:18:18PM +0100, Ben Hutchings wrote: > > > snprintf() returns the number of bytes that could have been written > > > (excluding the null), not

Re: [PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-01-13 Thread Greg Kroah-Hartman
On Fri, Dec 27, 2013 at 08:10:27PM +0100, Ben Hutchings wrote: On Fri, 2013-12-27 at 10:47 -0800, Greg Kroah-Hartman wrote: On Fri, Dec 27, 2013 at 06:18:18PM +0100, Ben Hutchings wrote: snprintf() returns the number of bytes that could have been written (excluding the null), not the

Re: [PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2013-12-27 Thread Joe Perches
On Fri, 2013-12-27 at 20:10 +0100, Ben Hutchings wrote: > On Fri, 2013-12-27 at 10:47 -0800, Greg Kroah-Hartman wrote: > > On Fri, Dec 27, 2013 at 06:18:18PM +0100, Ben Hutchings wrote: > > > snprintf() returns the number of bytes that could have been written > > > (excluding the null), not the

Re: [PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2013-12-27 Thread Ben Hutchings
On Fri, 2013-12-27 at 10:47 -0800, Greg Kroah-Hartman wrote: > On Fri, Dec 27, 2013 at 06:18:18PM +0100, Ben Hutchings wrote: > > snprintf() returns the number of bytes that could have been written > > (excluding the null), not the actual number of bytes written. Given a > > long enough subsystem

Re: [PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2013-12-27 Thread Greg Kroah-Hartman
On Fri, Dec 27, 2013 at 06:18:18PM +0100, Ben Hutchings wrote: > snprintf() returns the number of bytes that could have been written > (excluding the null), not the actual number of bytes written. Given a > long enough subsystem or device name, these functions will advance > beyond the end of the

[PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2013-12-27 Thread Ben Hutchings
snprintf() returns the number of bytes that could have been written (excluding the null), not the actual number of bytes written. Given a long enough subsystem or device name, these functions will advance beyond the end of the on-stack buffer in dev_vprintk_exit(), resulting in an information

[PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2013-12-27 Thread Ben Hutchings
snprintf() returns the number of bytes that could have been written (excluding the null), not the actual number of bytes written. Given a long enough subsystem or device name, these functions will advance beyond the end of the on-stack buffer in dev_vprintk_exit(), resulting in an information

Re: [PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2013-12-27 Thread Greg Kroah-Hartman
On Fri, Dec 27, 2013 at 06:18:18PM +0100, Ben Hutchings wrote: snprintf() returns the number of bytes that could have been written (excluding the null), not the actual number of bytes written. Given a long enough subsystem or device name, these functions will advance beyond the end of the

Re: [PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2013-12-27 Thread Ben Hutchings
On Fri, 2013-12-27 at 10:47 -0800, Greg Kroah-Hartman wrote: On Fri, Dec 27, 2013 at 06:18:18PM +0100, Ben Hutchings wrote: snprintf() returns the number of bytes that could have been written (excluding the null), not the actual number of bytes written. Given a long enough subsystem or

Re: [PATCH] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2013-12-27 Thread Joe Perches
On Fri, 2013-12-27 at 20:10 +0100, Ben Hutchings wrote: On Fri, 2013-12-27 at 10:47 -0800, Greg Kroah-Hartman wrote: On Fri, Dec 27, 2013 at 06:18:18PM +0100, Ben Hutchings wrote: snprintf() returns the number of bytes that could have been written (excluding the null), not the actual