Mailing List Archive

core in libspf2 on SunOS 5.8
Hi

I'm using libspf2 version 1.0.4.
I'm seeing core dumps with stack trace as -
=>[1] __ns_name_skip(0xfb5ef22c, 0xfb5f87be, 0x1ce, 0x0, 0x0, 0xce), at
0xfe5d1bc8
[2] dn_skipname(0xfb5f77b0, 0xfb5f87be, 0xfb5f0508, 0x3, 0x29a5bac,
0xfb5f03f0), at 0xfe5d8e10
[3] __ns_skiprr(0xfb5efc1e, 0xfb5f87be, 0x1, 0xfb5f87be, 0x4f4,
0xfb5f77b0), at 0xfe5d1f54
[4] __ns_initparse(0xfb5f87be, 0xfb5efbbc, 0xfb5efbbc, 0x1, 0xfb5efbb8,
0xfb5efc1e), at 0xfe5d2124
[5] SPF_dns_lookup_resolv(0x20a0378, 0xfb5f0490, 0xc, 0x1, 0xfd1e8720,
0xdb), at 0xfd1e8b4c
[6] SPF_dns_rlookup(0x20a0378, 0xfb5f05b4, 0xc, 0x1, 0x20, 0x20), at
0xfd1e5160
[7] SPF_eval_id(0x4d1298, 0x4c2a18, 0x20a0378, 0x1, 0x0, 0x0), at
0xfd1ebf88
[8] SPF_result(0x4d1298, 0x20a0378, 0x0, 0xfb5f0988, 0x4cbb9c, 0x1c00), at
0xfd1e72a8


On further debugging, it looks like, there is an issue with the code in the
function 'SPF_dns_lookup_resolv' (spf_dns_resolv.c).
The code that calls res_query is -
/*
* try resolving the name
*/
#if HAVE_DECL_RES_NINIT
dns_len = res_nquery( &spfhook->res_state, domain, ns_c_in, rr_type,
response, sizeof( response ) );
#else
dns_len = res_query( domain, ns_c_in, rr_type,
response, sizeof( response ) );
#endif

The Solaris manpage says -
The res_nquery() and res_query() routines return a length
that may be **bigger** than anslen. In that case, retry the
query with a larger buf. The answer to the second query may
be larger still], so it is recommended that you supply a buf
larger than the answer returned by the previous query.
answer must be large enough to receive a maximum UDP
response from the server or parts of the answer will be
silently discarded. The default maximum UDP response size
is 512 bytes.

In this core dump I saw that dns_len was greater than response size.
response in code is response[2048]. Whereas, dns_len was set to 50K plus.
Calling res_nquery with this faulty length caused the core dump.

Has anyone experienced this issue before ?
Any plans to fix this ? I checked version 1.2.5 and the code is same. So the
issue would exist in latest code as well.

Could anyone point me to the bug database please ?

Thanks,
Manish.

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: core in libspf2 on SunOS 5.8 [ In reply to ]
IIRC, there is a bug reporting tool on libspf2.org. I don't think there is a
public bug database.

The current libspf2 release is 1.2.5. Have you tried the current version?

Scott K

Note: I don't use libspf2, so I won't be of any help solving your actual
problem.

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: core in libspf2 on SunOS 5.8 [ In reply to ]
Hi

I was not able to locate the bug reporting tool on libspf2.org
I checked 1.2.5 and the code is same. So the problem will exist.

Any idea who will help in this issue or should I submit my support request
at http://www.openspf.org/Contact ?

Many Thanks for your help,
Manish.


On 1/24/07, Scott Kitterman <scott@kitterman.com> wrote:
>
> IIRC, there is a bug reporting tool on libspf2.org. I don't think there
> is a
> public bug database.
>
> The current libspf2 release is 1.2.5. Have you tried the current version?
>
> Scott K
>
> Note: I don't use libspf2, so I won't be of any help solving your actual
> problem.
>
> -------
> To unsubscribe, change your address, or temporarily deactivate your
> subscription,
> please go to http://v2.listbox.com/member/?list_id=1007
>

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: core in libspf2 on SunOS 5.8 [ In reply to ]
On Thursday 25 January 2007 01:29, Manish Raje wrote:
> Hi
>
> I was not able to locate the bug reporting tool on libspf2.org
> I checked 1.2.5 and the code is same. So the problem will exist.

http://libspf2.org/support.html

libspf2 [at] rt.anarres.org

> Any idea who will help in this issue or should I submit my support request
> at http://www.openspf.org/Contact ?

This is as good a place as any. No one is going to get a request that way
that won't see it here.

I doubt anyone is going to be able to help with SunOS 5.8 specific issues
(which I'm guessing your having) since it's unlikely they would have access
to a SunOS box. I'd encourage you to continue trying to understand the issue
and work through it.

Scott K

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: core in libspf2 on SunOS 5.8 [ In reply to ]
Thanks much Scott for attending to this.
I will start work on this and also open a ticket at libspf2 [at]
rt.anarres.org

Manish.


On 1/25/07, Scott Kitterman <scott@kitterman.com> wrote:
>
> On Thursday 25 January 2007 01:29, Manish Raje wrote:
> > Hi
> >
> > I was not able to locate the bug reporting tool on libspf2.org
> > I checked 1.2.5 and the code is same. So the problem will exist.
>
> http://libspf2.org/support.html
>
> libspf2 [at] rt.anarres.org
>
> > Any idea who will help in this issue or should I submit my support
> request
> > at http://www.openspf.org/Contact ?
>
> This is as good a place as any. No one is going to get a request that way
> that won't see it here.
>
> I doubt anyone is going to be able to help with SunOS 5.8 specific issues
> (which I'm guessing your having) since it's unlikely they would have
> access
> to a SunOS box. I'd encourage you to continue trying to understand the
> issue
> and work through it.
>
> Scott K
>
> -------
> To unsubscribe, change your address, or temporarily deactivate your
> subscription,
> please go to http://v2.listbox.com/member/?list_id=1007
>

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: core in libspf2 on SunOS 5.8 [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scott Kitterman wrote:
> I doubt anyone is going to be able to help with SunOS 5.8 specific
> issues (which I'm guessing your having) since it's unlikely they would
> have access to a SunOS box. I'd encourage you to continue trying to
> understand the issue and work through it.

... and please do report back your findings here, so we may get the libspf2
author to fix the issue!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFuKmwwL7PKlBZWjsRAie3AKDEGgAoQnyXW8wkCDM2JsCw+q9DMACbBL8C
hPNA4h93G7EDmlSQ1ndlH1w=
=Yq1W
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?list_id=1007
Re: core in libspf2 on SunOS 5.8 [ In reply to ]
Manish Raje <manish.raje <at> gmail.com> writes:

>
>
> Hi
>
> I'm using libspf2 version 1.0.4.
> I'm seeing core dumps with stack trace as -
> =>[1] __ns_name_skip(0xfb5ef22c, 0xfb5f87be, 0x1ce, 0x0, 0x0, 0xce), at 0xfe5d1bc8 [2] dn_skipname(0xfb5f77b0, 0xfb5f87be,
0xfb5f0508, 0x3, 0x29a5bac, 0xfb5f03f0), at 0xfe5d8e10 [3] __ns_skiprr(0xfb5efc1e, 0xfb5f87be, 0x1, 0xfb5f87be, 0x4f4, 0xfb5f77b0),
at 0xfe5d1f54
> [4] __ns_initparse(0xfb5f87be, 0xfb5efbbc, 0xfb5efbbc, 0x1, 0xfb5efbb8, 0xfb5efc1e), at 0xfe5d2124 [5]
SPF_dns_lookup_resolv(0x20a0378, 0xfb5f0490, 0xc, 0x1, 0xfd1e8720, 0xdb), at 0xfd1e8b4c [6] SPF_dns_rlookup(0x20a0378, 0xfb5f05b4,
0xc, 0x1, 0x20, 0x20), at 0xfd1e5160
> [7] SPF_eval_id(0x4d1298, 0x4c2a18, 0x20a0378, 0x1, 0x0, 0x0), at 0xfd1ebf88 [8] SPF_result(0x4d1298, 0x20a0378, 0x0,
0xfb5f0988, 0x4cbb9c, 0x1c00), at 0xfd1e72a8
>
> On further debugging, it looks like, there is an issue with the code in the function 'SPF_dns_lookup_resolv' (spf_dns_resolv.c).
> The code that calls res_query is -
> /* * try resolving the name */#if HAVE_DECL_RES_NINIT dns_len = res_nquery( &spfhook->res_state, domain, ns_c_in,
rr_type, response, sizeof( response ) );
> #else dns_len = res_query( domain, ns_c_in, rr_type, response, sizeof( response ) );#endif
> The Solaris manpage says -
> The res_nquery() and res_query() routines return a lengththat may be **bigger** than anslen. In that case, retry thequery with a
larger buf. The answer to the second query maybe larger still], so it is recommended that you supply a buf
> larger than the answer returned by the previous query.answer must be large enough to receive a maximum UDPresponse from the server
or parts of the answer will besilently discarded. The default maximum UDP response size
> is 512 bytes.
>
> In this core dump I saw that dns_len was greater than response size. response in code is response[2048]. Whereas, dns_len was set
to 50K plus. Calling res_nquery with this faulty length caused the core dump.
>
> Has anyone experienced this issue before ?
> Any plans to fix this ? I checked version 1.2.5 and the code is same. So the issue would exist in latest code as well.
>
> Could anyone point me to the bug database please ?
>
> Thanks,
> Manish.
>

Hi All

Me and Mike (Zraly) have worked around this issue by modifying the spf code in "spf_dns_resolv.c". It would be great if you could
incorporate the changes in upcoming versions of SPF.

Changes attached.

Thanks,
Manish.
Re: Re: core in libspf2 on SunOS 5.8 [ In reply to ]
Hi

My earlier mail was in a wrong thread.
Replying to the correct one which was raised earlier and has the history of
the problem.

We (Michael.Zraly@openwave.com and me) have worked around this issue by
modifying the spf code in "spf_dns_resolv.c". It would be great if you could
incorporate the changes in upcoming versions of SPF.

Changes attached.

Thanks,
Manish.

On 1/25/07, Julian Mehnle <julian@mehnle.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Scott Kitterman wrote:
> > I doubt anyone is going to be able to help with SunOS 5.8 specific
> > issues (which I'm guessing your having) since it's unlikely they would
> > have access to a SunOS box. I'd encourage you to continue trying to
> > understand the issue and work through it.
>
>
> ... and please do report back your findings here, so we may get the libspf2
> author to fix the issue!
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFFuKmwwL7PKlBZWjsRAie3AKDEGgAoQnyXW8wkCDM2JsCw+q9DMACbBL8C
> hPNA4h93G7EDmlSQ1ndlH1w=
> =Yq1W
> -----END PGP SIGNATURE-----
>
>
> -------
> To unsubscribe, change your address, or temporarily deactivate your
> subscription,
> please go to http://v2.listbox.com/member/?list_id=1007
>