Bug #1582
Segmentation fault in load_endpoint_type2()
90%
Description
Hi,
I'm using lasso-2.3.6 on Linux.
And I called lasso_server_new() function as follow:
lasso_server_new("sp-metadata.xml", NULL, NULL, NULL);
If sp-metadata.xml has an AssertionConsumerService element without index attribute,
SIGSEGV occurs in stdlib's strtol() function which is called by xsdUnsignedShortParse() in lasso/saml-2.0/provider.c.
The reason why SIGSEGV occurs is that NULL is passed to the first argument of strtol().
The NULL comes from the variable 'index' in load_endpoint_type2() function.
I think the index attribute in AssertionConsumerService element is optional,
so the 'index' returned by getSaml2MdProp() may be NULL.
However, the 'index' is not asserted before calling xsdUnsignedShortParse().
I attach a patch to fix this problem.
Regards,
Hiro
Fichiers
Révisions associées
Historique
Mis à jour par Hiromitsu Fujita il y a plus de 11 ans
I think the index attribute in AssertionConsumerService element is optional,
Sorry, I was wrong. The index attribute is required.
But this problem should be fixed for in case if a metadata is not valid.
Mis à jour par Benjamin Dauvergne il y a plus de 11 ans
- Assigné à mis à Benjamin Dauvergne
- Priorité changé de Normal à Haut
Mis à jour par Benjamin Dauvergne il y a plus de 11 ans
- Statut changé de Nouveau à Solution déployée
- % réalisé changé de 0 à 90
Appliqué par commit e94015f8bcc168c9882348d2e8c5a5138ea56676.
Mis à jour par Benjamin Dauvergne il y a plus de 11 ans
- Statut changé de Solution déployée à Fermé
- Priorité changé de Haut à Normal
fix segfault in saml-2.0/provider.c:load_endpoint_type2
Thanks to Hiromitsu Fujita for the patch. fixes #1582.