Projet

Général

Profil

Bug #1582

Segmentation fault in load_endpoint_type2()

Ajouté par Hiromitsu Fujita il y a plus de 11 ans. Mis à jour il y a plus de 11 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
SAMLv2
Version cible:
Début:
03 août 2012
Echéance:
% réalisé:

90%

Temps estimé:
Patch proposed:
Planning:

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

fix-lasso-saml2-provider-segfault.patch (487 octets) fix-lasso-saml2-provider-segfault.patch Hiromitsu Fujita, 03 août 2012 23:12

Révisions associées

Révision e94015f8 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 11 ans

fix segfault in saml-2.0/provider.c:load_endpoint_type2

Thanks to Hiromitsu Fujita for the patch. fixes #1582.

Historique

#1

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.

#2

Mis à jour par Benjamin Dauvergne il y a plus de 11 ans

  • Assigné à mis à Benjamin Dauvergne
  • Priorité changé de Normal à Haut
#3

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
#4

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

Formats disponibles : Atom PDF