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

2014-07-11 Thread Greg Kroah-Hartman
On Fri, Jul 11, 2014 at 06:20:58PM +0100, Ben Hutchings wrote: > On Wed, 2014-07-09 at 16:57 -0700, Greg Kroah-Hartman wrote: > > On Sun, Jun 08, 2014 at 11:51:43PM +0100, Ben Hutchings wrote: > > > snprintf() returns the number of bytes that could have been written > > > (excluding the null), not

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

2014-07-11 Thread Ben Hutchings
On Wed, 2014-07-09 at 16:57 -0700, Greg Kroah-Hartman wrote: > On Sun, Jun 08, 2014 at 11:51:43PM +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 v2] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-07-11 Thread Ben Hutchings
On Wed, 2014-07-09 at 16:57 -0700, Greg Kroah-Hartman wrote: On Sun, Jun 08, 2014 at 11:51:43PM +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 v2] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-07-11 Thread Greg Kroah-Hartman
On Fri, Jul 11, 2014 at 06:20:58PM +0100, Ben Hutchings wrote: On Wed, 2014-07-09 at 16:57 -0700, Greg Kroah-Hartman wrote: On Sun, Jun 08, 2014 at 11:51:43PM +0100, Ben Hutchings wrote: snprintf() returns the number of bytes that could have been written (excluding the null), not the

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

2014-07-09 Thread Greg Kroah-Hartman
On Sun, Jun 08, 2014 at 11:51:43PM +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 v2] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-07-09 Thread Greg Kroah-Hartman
On Sun, Jun 08, 2014 at 11:51:43PM +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 v2] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-06-08 Thread Joe Perches
On Sun, 2014-06-08 at 23:51 +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 v2] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-06-08 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 v2] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-06-08 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 v2] drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()

2014-06-08 Thread Joe Perches
On Sun, 2014-06-08 at 23:51 +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 on-stack