All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Stefan Kisdaroczi <kisda@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] proc_file_read: Apparent buffer overflow
Date: Thu, 18 Mar 2010 17:25:16 +0100	[thread overview]
Message-ID: <4BA253EC.8050601@domain.hid> (raw)
In-Reply-To: <4BA24469.1040508@domain.hid>

Stefan Kisdaroczi wrote:
> Am 10.03.2010 19:56, schrieb Stefan Kisdaroczi:
>> Hi,
>>
>> cat /proc/xenomai/heap returns the first 4096 Bytes and fails then with "Bad address".
>> On the console I see: "proc_file_read: Apparent buffer overflow!"
>>
>> xeno 2.5.1, linux 2.6.32.8, x86 32bit UP, native skin, lot of rt_queues:
>> # ls -1 /proc/xenomai/registry/native/queues/ | wc -l
>> 233
>> # ls -1 /proc/xenomai/registry/native/heaps/ | wc -l
>> 26
> 
> With some luck i get a oops doing cat /proc/xenomai/heap.
> Looking at the while() loop in heap_read_proc() in ksrc/nucleus/heap.c
> its obvious.

You mean because "count" isn't checked while the output page is filled?
Well, looks like converting the heap proc interface to the seq API is a
good idea. References can be found in ksrc/nucleus/sched.c, patches are
welcome. :)

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux


      reply	other threads:[~2010-03-18 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 18:56 [Xenomai-core] proc_file_read: Apparent buffer overflow Stefan Kisdaroczi
2010-03-18 15:19 ` Stefan Kisdaroczi
2010-03-18 16:25   ` Jan Kiszka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BA253EC.8050601@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=kisda@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.