* [Xenomai-core] proc_file_read: Apparent buffer overflow
@ 2010-03-10 18:56 Stefan Kisdaroczi
2010-03-18 15:19 ` Stefan Kisdaroczi
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kisdaroczi @ 2010-03-10 18:56 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
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
regards
Stefan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-core] proc_file_read: Apparent buffer overflow
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
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kisdaroczi @ 2010-03-18 15:19 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 584 bytes --]
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.
Stefan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-core] proc_file_read: Apparent buffer overflow
2010-03-18 15:19 ` Stefan Kisdaroczi
@ 2010-03-18 16:25 ` Jan Kiszka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2010-03-18 16:25 UTC (permalink / raw)
To: Stefan Kisdaroczi; +Cc: xenomai
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-18 16:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.