Re: Detect Stack Overflows?

Re: Detect Stack Overflows?

am 24.03.2008 06:43:46 von Rodrigo

Rajat,

There are some approaches to do that, most of them try to prevent in some
way the use of stack overflows to get code execution.

pax and exec-shield are two examples...

Also, I saw some projects related to create forge the syscall interruption
to analyze the program flow.

If you want to know something more specific, will be easier to give a
consistent reply for your question.



cya,


Rodrigo (BSDaemon).

--
http://www.kernelhacking.com/rodrigo

Kernel Hacking: If i really know, i can hack

GPG KeyID: 1FCEDEA1


--------- Mensagem Original --------
De: Rajat Jain
Para: kernelnewbies@nl.linux.org ,
linux-newbie@vger.kernel.org
Assunto: Detect Stack Overflows?
Data: 24/03/08 05:24

>
>
> Hi,
>
> Is there a way to detect stack overflows in the kernel?
>
> I mean, apart from "You should use it sparingly" suggestions
:-).
>
> Thanks,
>
> Rajat
>
> --
> To unsubscribe from this list: send the line "unsubscribe
linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
>
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Detect Stack Overflows?

am 24.03.2008 10:04:18 von Rajat Jain

Hi,

Is there a way to detect stack overflows in the kernel?

I mean, apart from "You should use it sparingly" suggestions :-).

Thanks,

Rajat

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Detect Stack Overflows?

am 24.03.2008 10:52:55 von Manish Katiyar

On Mon, Mar 24, 2008 at 2:34 PM, Rajat Jain wrote:
>
> Hi,
>
> Is there a way to detect stack overflows in the kernel?

Kernel configuration has an option to "check for stack overflows"
under kernel hacking section. Is that what you are looking for ?
grep your .config for DEBUG_STACKOVERFLOW

Hope that helps.....

>
> I mean, apart from "You should use it sparingly" suggestions :-).
>
> Thanks,
>
> Rajat
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



--
Thanks & Regards,
********************************************
Manish Katiyar ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Detect Stack Overflows?

am 24.03.2008 11:34:39 von Mulyadi Santosa

hi..

On 3/24/08, Rajat Jain wrote:
>
> Hi,
>
> Is there a way to detect stack overflows in the kernel?
>
> I mean, apart from "You should use it sparingly" suggestions :-).

Do you no related features on kernel hacking? I vaguely remember
seeing one...but I could be wrong.

regards

Mulyadi.
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

RE: Detect Stack Overflows?

am 24.03.2008 11:55:41 von Rajat Jain

Hi,

>
> Kernel configuration has an option to "check for stack overflows"
> under kernel hacking section. Is that what you are looking for ?
> grep your .config for DEBUG_STACKOVERFLOW
>

Thanks, that it what I was looking for.

Rajat
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

RE: Detect Stack Overflows?

am 25.03.2008 06:14:10 von Rajat Jain

Hi,

>
> Kernel configuration has an option to "check for stack overflows"
> under kernel hacking section. Is that what you are looking for ?
> grep your .config for DEBUG_STACKOVERFLOW
>

On examination, I found that this option only adds a check for stack overflow only at the time an IRQ occurs. But there is a lot more scope for stack overflow in scenarios other than IRQ. For instance, a function call sequence may become large enough, a function may allocate too much automatic variables etc. IS there a way to detect that?

Thanks,

Rajat

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs