[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnu-radius] Bugfix: SEGFAULT in case of incomplete naslist specific
From: |
Maurice Makaay |
Subject: |
[Bug-gnu-radius] Bugfix: SEGFAULT in case of incomplete naslist specification |
Date: |
Thu, 20 Nov 2003 13:12:02 +0100 |
Hi,
If you do not specify the nastype in the naslist file, there's a possibility
that the radiusd will crash. If you specify:
<ipaddr>...whitespace...<nickname>...whitespace...
things will be fine, but the following will cause an error to occur:
<ipaddr>...whitespace...<nickname>
>From the source (lib/nas.c) I get the impression that the nastype may be
omitted, because there's a fallback mechanism in there:
read_naslist_entry(void *unused ARG_UNUSED, int fc, char **fv, LOCUS *loc)
{
----8<---- snapped some code -----
if (fv[2][0] == 0)
STRING_COPY(nas.nastype, "true");
else
STRING_COPY(nas.nastype, fv[2]);
If no whitespace is used after the nickname, fv[2] will be NULL and the
check for fv[2][0] being 0 makes no sense anymore. The problem can be
corrected by changing the if statement to:
if (fv[2] == NULL || fv[2][0] == 0)
Regards,
-- Maurice Makaay
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnu-radius] Bugfix: SEGFAULT in case of incomplete naslist specification,
Maurice Makaay <=