Re: [patch] Staging: sb105x: info leak in mp_get_count()

2013-11-04 Thread Josh Triplett
On Mon, Nov 04, 2013 at 10:01:00AM +0300, Dan Carpenter wrote:
 I've dropped most of the people from the CC list.
 
 On Sun, Nov 03, 2013 at 08:31:50PM -0800, Josh Triplett wrote:
  On Mon, Nov 04, 2013 at 02:11:50AM +0300, Dan Carpenter wrote:
   On Sun, Nov 03, 2013 at 10:28:02AM -0800, Josh Triplett wrote:
On Tue, Oct 29, 2013 at 11:01:43PM +0300, Dan Carpenter wrote:
 The icount.reserved[] array isn't initialized so it leaks stack
 information to userspace.
 
 Reported-by: Nico Golde n...@ngolde.de
 Reported-by: Fabian Yamaguchi f...@goesec.de
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

Reviewed-by: Josh Triplett j...@joshtriplett.org

Also, you don't quite have the patch format right here; you should have
a --- line after the commit mesage, followed by a diffstat.  Did you use
git format-patch to generate this patch?
   
   I normally don't include the diffstat.  Which tools care about that?
  
  Human wetware. :)
  
  It isn't required by any tools.  The --- is, though, to produce
  something applicable by git.
 
 That's really weird.  I've been using the same scripts for years and no
 one has complained before.  The patch applies fine with `git am` for me.
 I'm using git version 1.7.10.4.

I stand corrected.  I was under the impression that the --- was required
to mark the end of the commit message, but sure enough, git am seems to
accept it.  Reading the git am manpage, it says that a line starting
with diff - will also indicate the end of the commit message and start
of the patch.

It still isn't the conventional format produced by git format-patch,
which I'd recommend matching for ease of human consumption, but
nonetheless it apparently works.

- Josh Triplett
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [patch] Staging: sb105x: info leak in mp_get_count()

2013-11-04 Thread Dan Carpenter
On Mon, Nov 04, 2013 at 12:08:50PM -0500, Steven Rostedt wrote:
 On Mon, 4 Nov 2013 02:11:50 +0300
 Dan Carpenter dan.carpen...@oracle.com wrote:
 
  On Sun, Nov 03, 2013 at 10:28:02AM -0800, Josh Triplett wrote:
   On Tue, Oct 29, 2013 at 11:01:43PM +0300, Dan Carpenter wrote:
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.

Reported-by: Nico Golde n...@ngolde.de
Reported-by: Fabian Yamaguchi f...@goesec.de
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
   
   Reviewed-by: Josh Triplett j...@joshtriplett.org
   
   Also, you don't quite have the patch format right here; you should have
   a --- line after the commit mesage, followed by a diffstat.  Did you use
   git format-patch to generate this patch?
  
  I normally don't include the diffstat.  Which tools care about that?
  
 
 As Josh already replied, it is most helpful for the human reviewer.
 Linus uses it all the time to see how intrusive a patch may be.
 
 Yes, please always include a diffstat for any patch you send.

It sounds simple to add a diffstat but it's sort of a pain to redo my
workflow...  I don't use git commits.  If I need to make the same change
to multiple files then I end up appending the diff to the end of an
existing email and tweaking the diff hunks together by hand.

I guess I could writing an append_diff.sh script which munges the
diffstat but it seems like it might be error prone.  I'll take a look
though.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [patch] Staging: sb105x: info leak in mp_get_count()

2013-11-03 Thread Josh Triplett
On Tue, Oct 29, 2013 at 11:01:43PM +0300, Dan Carpenter wrote:
 The icount.reserved[] array isn't initialized so it leaks stack
 information to userspace.
 
 Reported-by: Nico Golde n...@ngolde.de
 Reported-by: Fabian Yamaguchi f...@goesec.de
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

Reviewed-by: Josh Triplett j...@joshtriplett.org

Also, you don't quite have the patch format right here; you should have
a --- line after the commit mesage, followed by a diffstat.  Did you use
git format-patch to generate this patch?

 diff --git a/drivers/staging/sb105x/sb_pci_mp.c 
 b/drivers/staging/sb105x/sb_pci_mp.c
 index bc53b4e..bde28b9 100644
 --- a/drivers/staging/sb105x/sb_pci_mp.c
 +++ b/drivers/staging/sb105x/sb_pci_mp.c
 @@ -1063,7 +1063,7 @@ static int mp_wait_modem_status(struct sb_uart_state 
 *state, unsigned long arg)
  
  static int mp_get_count(struct sb_uart_state *state, struct 
 serial_icounter_struct *icnt)
  {
 - struct serial_icounter_struct icount;
 + struct serial_icounter_struct icount = {};
   struct sb_uart_icount cnow;
   struct sb_uart_port *port = state-port;
  
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [patch] Staging: sb105x: info leak in mp_get_count()

2013-11-03 Thread Dan Carpenter
On Sun, Nov 03, 2013 at 10:28:02AM -0800, Josh Triplett wrote:
 On Tue, Oct 29, 2013 at 11:01:43PM +0300, Dan Carpenter wrote:
  The icount.reserved[] array isn't initialized so it leaks stack
  information to userspace.
  
  Reported-by: Nico Golde n...@ngolde.de
  Reported-by: Fabian Yamaguchi f...@goesec.de
  Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
 
 Reviewed-by: Josh Triplett j...@joshtriplett.org
 
 Also, you don't quite have the patch format right here; you should have
 a --- line after the commit mesage, followed by a diffstat.  Did you use
 git format-patch to generate this patch?

I normally don't include the diffstat.  Which tools care about that?

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [patch] Staging: sb105x: info leak in mp_get_count()

2013-11-03 Thread Josh Triplett
On Mon, Nov 04, 2013 at 02:11:50AM +0300, Dan Carpenter wrote:
 On Sun, Nov 03, 2013 at 10:28:02AM -0800, Josh Triplett wrote:
  On Tue, Oct 29, 2013 at 11:01:43PM +0300, Dan Carpenter wrote:
   The icount.reserved[] array isn't initialized so it leaks stack
   information to userspace.
   
   Reported-by: Nico Golde n...@ngolde.de
   Reported-by: Fabian Yamaguchi f...@goesec.de
   Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
  
  Reviewed-by: Josh Triplett j...@joshtriplett.org
  
  Also, you don't quite have the patch format right here; you should have
  a --- line after the commit mesage, followed by a diffstat.  Did you use
  git format-patch to generate this patch?
 
 I normally don't include the diffstat.  Which tools care about that?

Human wetware. :)

It isn't required by any tools.  The --- is, though, to produce
something applicable by git.

- Josh Triplett
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [patch] Staging: sb105x: info leak in mp_get_count()

2013-11-03 Thread Dan Carpenter
I've dropped most of the people from the CC list.

On Sun, Nov 03, 2013 at 08:31:50PM -0800, Josh Triplett wrote:
 On Mon, Nov 04, 2013 at 02:11:50AM +0300, Dan Carpenter wrote:
  On Sun, Nov 03, 2013 at 10:28:02AM -0800, Josh Triplett wrote:
   On Tue, Oct 29, 2013 at 11:01:43PM +0300, Dan Carpenter wrote:
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.

Reported-by: Nico Golde n...@ngolde.de
Reported-by: Fabian Yamaguchi f...@goesec.de
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
   
   Reviewed-by: Josh Triplett j...@joshtriplett.org
   
   Also, you don't quite have the patch format right here; you should have
   a --- line after the commit mesage, followed by a diffstat.  Did you use
   git format-patch to generate this patch?
  
  I normally don't include the diffstat.  Which tools care about that?
 
 Human wetware. :)
 
 It isn't required by any tools.  The --- is, though, to produce
 something applicable by git.

That's really weird.  I've been using the same scripts for years and no
one has complained before.  The patch applies fine with `git am` for me.
I'm using git version 1.7.10.4.

How are you applying patches?  I can update my scripts.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[patch] Staging: sb105x: info leak in mp_get_count()

2013-10-29 Thread Dan Carpenter
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.

Reported-by: Nico Golde n...@ngolde.de
Reported-by: Fabian Yamaguchi f...@goesec.de
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

diff --git a/drivers/staging/sb105x/sb_pci_mp.c 
b/drivers/staging/sb105x/sb_pci_mp.c
index bc53b4e..bde28b9 100644
--- a/drivers/staging/sb105x/sb_pci_mp.c
+++ b/drivers/staging/sb105x/sb_pci_mp.c
@@ -1063,7 +1063,7 @@ static int mp_wait_modem_status(struct sb_uart_state 
*state, unsigned long arg)
 
 static int mp_get_count(struct sb_uart_state *state, struct 
serial_icounter_struct *icnt)
 {
-   struct serial_icounter_struct icount;
+   struct serial_icounter_struct icount = {};
struct sb_uart_icount cnow;
struct sb_uart_port *port = state-port;
 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel