linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Wrong length / buffer overlow by the syslog syscall
@ 2012-12-05 10:27 Sylvain Munaut
  2012-12-05 11:26 ` Sylvain Munaut
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sylvain Munaut @ 2012-12-05 10:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jeff Mahoney

Hi,

I was debugging a segfault in the 'dmesg' utility that I finally
traced to the syslog syscall overflowing the buffer.
I'm under a 3.6.8 kernel and it has commit
e3756477aec028427fec767957c0d4b6cfb87208 present which apparently
fixed a similar issue, but I still have some occurence.

strace dmesg -s 8192

shows:

syslog(0x3, 0xb4e060, 0x2008)           = 8259

so despite being given a buffer of 8200 bytes, it writes 8259 ...

It happens on several machines and this only seem to happen if there
was a wrap around in the log buffer (it's a first observation on a
limited number of sample so it might be a coincidence)


Cheers,

    Sylvain

PS: Please cc me in any response, I'm not on the list.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-07  2:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-05 10:27 Wrong length / buffer overlow by the syslog syscall Sylvain Munaut
2012-12-05 11:26 ` Sylvain Munaut
2012-12-05 14:02 ` [RFC] printk: Fix print_time length computation when no buffer is given Sylvain Munaut
2012-12-06 17:09 ` [PATCH] " Sylvain Munaut
2012-12-07  2:40   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).