Debian Bug report logs - #426355
libonig SEGV when using UTF-8 encoding

version graph

Package: libonig-dev; Maintainer for libonig-dev is Max Kellermann <max@duempel.org>; Source for libonig-dev is src:libonig.

Reported by: jed@jedsoft.org

Date: Mon, 28 May 2007 06:33:01 UTC

Severity: grave

Tags: fixed-upstream, patch

Found in version libonig/5.2.0-1

Fixed in versions libonig/5.9.0-0.1, libonig/5.9.1-1

Done: Alexander Wirt <formorer@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Max Kellermann <max@duempel.org>:
Bug#426355; Package libonig-dev. Full text and rfc822 format available.

Acknowledgement sent to jed@jedsoft.org:
New Bug report received and forwarded. Copy sent to Max Kellermann <max@duempel.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "John E. Davis" <davis@space.mit.edu>
To: submit@bugs.debian.org
Subject: libonig SEGV when using UTF-8 encoding
Date: Mon, 28 May 2007 02:30:02 -0400
Package: libonig-dev
Version: 5.2.0-1
Severity: grave

The following (see below) simple C program produces a SEGV in
onig_new.  To see this, compile the code using, e.g., 

   gcc bug.c -lonig

and then run it:

   ./a.out

On my debian etch system, I see:

  Segmentation fault (core dumped)

I set the severity level to grave because this bug makes the library
unusable to me.

Valgrind shows where the error occurs:

==1902== Invalid read of size 4
==1902==    at 0x43F0025: (within /usr/lib/libonig.so.2.0.0)
==1902==    by 0x4402089: onigenc_unicode_apply_all_case_fold (in /usr/lib/libonig.so.2.0.0)
==1902==    by 0x43F09AD: (within /usr/lib/libonig.so.2.0.0)
==1902==    by 0x43F1A1D: (within /usr/lib/libonig.so.2.0.0)
==1902==    by 0x43F1B18: (within /usr/lib/libonig.so.2.0.0)
==1902==    by 0x43F171E: (within /usr/lib/libonig.so.2.0.0)
==1902==    by 0x43F1A1D: (within /usr/lib/libonig.so.2.0.0)
==1902==    by 0x43F1B18: (within /usr/lib/libonig.so.2.0.0)
==1902==    by 0x43F1CEE: onig_parse_make_tree (in /usr/lib/libonig.so.2.0.0)
==1902==    by 0x43F8921: onig_compile (in /usr/lib/libonig.so.2.0.0)

Here is the code to bug.c:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oniguruma.h>
int main (int argc, char **argv)
{
   const UChar *pattern;
   OnigErrorInfo err_info;
   int status;
   regex_t *re;
   int i;
   
   for (i = 0; i < 2; i++)
     {
	pattern = (UChar *) "(?i)[a-z][a-z]+";
	status = onig_new (&re, pattern, pattern + strlen ((char *)pattern),
			   ONIG_OPTION_NONE, ONIG_ENCODING_UTF8,
			   ONIG_SYNTAX_PERL, &err_info);
	onig_free (re);
	if (status != ONIG_NORMAL)
	  {
	     fprintf (stderr, "onig_new failed\n");
	     return 1;
	  }
     }
   return 0;
}

Thanks,
--John



Information forwarded to debian-bugs-dist@lists.debian.org, Max Kellermann <max@duempel.org>:
Bug#426355; Package libonig-dev. Full text and rfc822 format available.

Acknowledgement sent to Laurent Bigonville <bigon@bigon.be>:
Extra info received and forwarded to list. Copy sent to Max Kellermann <max@duempel.org>. Full text and rfc822 format available.

Message #10 received at 426355@bugs.debian.org (full text, mbox):

From: Laurent Bigonville <bigon@bigon.be>
To: 426355@bugs.debian.org
Subject: Re: libonig SEGV when using UTF-8 encoding
Date: Sat, 21 Jul 2007 14:14:20 +0200
[Message part 1 (text/plain, inline)]
Hi,

The new upstream release (5.9.0) fixes the problem.

Please upgrade

Thanks
[Message part 2 (application/pgp-signature, inline)]

Tags added: fixed-upstream Request was from Laurent Bigonville <bigon@bigon.be> to control@bugs.debian.org. (Sat, 21 Jul 2007 14:42:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Max Kellermann <max@duempel.org>:
Bug#426355; Package libonig-dev. Full text and rfc822 format available.

Acknowledgement sent to Laurent Bigonville <bigon@bigon.be>:
Extra info received and forwarded to list. Copy sent to Max Kellermann <max@duempel.org>. Full text and rfc822 format available.

Message #17 received at 426355@bugs.debian.org (full text, mbox):

From: Laurent Bigonville <bigon@bigon.be>
To: 426355@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: libonig SEGV when using UTF-8 encoding
Date: Sat, 4 Aug 2007 15:42:56 +0200
[Message part 1 (text/plain, inline)]
tags 426355 + pending patch
thanks

Hi,

Here the patch of my NMU attempt

If you have any objections about this NMU please contact me ASAP

Regards

Laurent Bigonville
[libonig_5.9.0-0.1.diff (text/x-diff, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Tags added: pending, patch Request was from Laurent Bigonville <bigon@bigon.be> to control@bugs.debian.org. (Sat, 04 Aug 2007 13:45:05 GMT) Full text and rfc822 format available.

Reply sent to Laurent Bigonville <bigon@bigon.be>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to jed@jedsoft.org:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #24 received at 426355-close@bugs.debian.org (full text, mbox):

From: Laurent Bigonville <bigon@bigon.be>
To: 426355-close@bugs.debian.org
Subject: Bug#426355: fixed in libonig 5.9.0-0.1
Date: Sun, 05 Aug 2007 08:47:24 +0000
Source: libonig
Source-Version: 5.9.0-0.1

We believe that the bug you reported is fixed in the latest version of
libonig, which is due to be installed in the Debian FTP archive:

libonig-dev_5.9.0-0.1_i386.deb
  to pool/main/libo/libonig/libonig-dev_5.9.0-0.1_i386.deb
libonig2-dbg_5.9.0-0.1_i386.deb
  to pool/main/libo/libonig/libonig2-dbg_5.9.0-0.1_i386.deb
libonig2_5.9.0-0.1_i386.deb
  to pool/main/libo/libonig/libonig2_5.9.0-0.1_i386.deb
libonig_5.9.0-0.1.diff.gz
  to pool/main/libo/libonig/libonig_5.9.0-0.1.diff.gz
libonig_5.9.0-0.1.dsc
  to pool/main/libo/libonig/libonig_5.9.0-0.1.dsc
libonig_5.9.0.orig.tar.gz
  to pool/main/libo/libonig/libonig_5.9.0.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 426355@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Laurent Bigonville <bigon@bigon.be> (supplier of updated libonig package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 04 Aug 2007 15:07:34 +0200
Source: libonig
Binary: libonig-dev libonig2 libonig2-dbg
Architecture: source i386
Version: 5.9.0-0.1
Distribution: unstable
Urgency: low
Maintainer: Max Kellermann <max@duempel.org>
Changed-By: Laurent Bigonville <bigon@bigon.be>
Description: 
 libonig-dev - Development files for libonig2
 libonig2   - Oniguruma regular expressions library
 libonig2-dbg - Debugging symbols for libonig2
Closes: 426355
Changes: 
 libonig (5.9.0-0.1) unstable; urgency=low
 .
   * Non-maintainer upload.
   * New upstream release (Closes: #426355)
   * debian/control:
     - Use binary:Version instead of Source-Version
   * debian/rules:
     - Don't hide make distclean error
     - Fix copy of config.{sub,guess}
     - Remove deprecated DH_COMPAT and use compat file instead
Files: 
 0a46096f04ac85adf0a14a0dab96c462 651 libs optional libonig_5.9.0-0.1.dsc
 8d0ef96e475e4f7edffe04b352f5c21b 585024 libs optional libonig_5.9.0.orig.tar.gz
 e75ec9cf3f00da417e001e8258d6a612 3373 libs optional libonig_5.9.0-0.1.diff.gz
 395009421d2188b1944b191e6eea428a 132494 libs optional libonig2_5.9.0-0.1_i386.deb
 de65ad609762ac846f7d03799f899356 143440 libdevel optional libonig2-dbg_5.9.0-0.1_i386.deb
 1cb3ae8c31fcd568d2ad60b747c9466f 183150 libdevel optional libonig-dev_5.9.0-0.1_i386.deb

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

iD8DBQFGtK9L4VUX8isJIMARApKzAJ9O4F9EMYBrw9zXtL2nJHrWFHD5AACdF6NF
RhCrbPuGZeQu3E/XOmdD44o=
=7kXX
-----END PGP SIGNATURE-----




Reply sent to Alexander Wirt <formorer@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to jed@jedsoft.org:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #29 received at 426355-close@bugs.debian.org (full text, mbox):

From: Alexander Wirt <formorer@debian.org>
To: 426355-close@bugs.debian.org
Subject: Bug#426355: fixed in libonig 5.9.1-1
Date: Mon, 07 Jan 2008 11:02:06 +0000
Source: libonig
Source-Version: 5.9.1-1

We believe that the bug you reported is fixed in the latest version of
libonig, which is due to be installed in the Debian FTP archive:

libonig-dev_5.9.1-1_i386.deb
  to pool/main/libo/libonig/libonig-dev_5.9.1-1_i386.deb
libonig2-dbg_5.9.1-1_i386.deb
  to pool/main/libo/libonig/libonig2-dbg_5.9.1-1_i386.deb
libonig2_5.9.1-1_i386.deb
  to pool/main/libo/libonig/libonig2_5.9.1-1_i386.deb
libonig_5.9.1-1.diff.gz
  to pool/main/libo/libonig/libonig_5.9.1-1.diff.gz
libonig_5.9.1-1.dsc
  to pool/main/libo/libonig/libonig_5.9.1-1.dsc
libonig_5.9.1.orig.tar.gz
  to pool/main/libo/libonig/libonig_5.9.1.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 426355@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alexander Wirt <formorer@debian.org> (supplier of updated libonig package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 07 Jan 2008 11:46:27 +0100
Source: libonig
Binary: libonig-dev libonig2 libonig2-dbg
Architecture: source i386
Version: 5.9.1-1
Distribution: unstable
Urgency: low
Maintainer: Max Kellermann <max@duempel.org>
Changed-By: Alexander Wirt <formorer@debian.org>
Description: 
 libonig-dev - Development files for libonig2
 libonig2   - Oniguruma regular expressions library
 libonig2-dbg - Debugging symbols for libonig2
Closes: 426355
Changes: 
 libonig (5.9.1-1) unstable; urgency=low
 .
   [ Max Kellermann ]
   * new upstream release
   * acknowledge NMU, thanks Laurent (closes: #426355)
   * run test suite after build
   * added watch file
   * bumped Standards-Version to 3.7.3
   * added homepage header to debian/control
   * priority "extra"
Files: 
 e81ba5744efbc64905da0ae7b369a834 700 libs extra libonig_5.9.1-1.dsc
 5ce5f9bba5e83f0ea6ec24e1ac77091c 586578 libs extra libonig_5.9.1.orig.tar.gz
 dd946bf292f734dfd3fd1c8465fb36ad 3569 libs extra libonig_5.9.1-1.diff.gz
 029a803f1993b0af6e380efe2510fbc3 133930 libs extra libonig2_5.9.1-1_i386.deb
 70ea9499a3dbc96549f99996175302ea 146968 libdevel extra libonig2-dbg_5.9.1-1_i386.deb
 56c76d76fc8f993c67c17a813dc3b438 184732 libdevel extra libonig-dev_5.9.1-1_i386.deb

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

iD8DBQFHggNG01u8mbx9AgoRAjTcAKCSGIpF7J8U2A7M1JvthsV1umHsAgCeNxGU
Nd/eIsRgUP2sdcGwKChZiBA=
=5qVS
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 16 Mar 2009 09:16:06 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 00:19:11 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.