mdb-sql crashed with SIGSEGV in _IO_vfprintf_internal()

Bug #1227033 reported by Boris Barbulovski
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdbtools (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Just execute

echo "select 'test';" | mdb-sql

and mdb-sql will crash.

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: mdbtools 0.7-3
ProcVersionSignature: Ubuntu 3.11.0-7.14-generic 3.11.1
Uname: Linux 3.11.0-7-generic x86_64
ApportVersion: 2.12.2-0ubuntu1
Architecture: amd64
CrashCounter: 1
Date: Wed Sep 18 11:37:13 2013
ExecutablePath: /usr/bin/mdb-sql
InstallationDate: Installed on 2013-07-11 (68 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130711)
MarkForUpload: True
ProcCmdline: mdb-sql
SegvAnalysis:
 Segfault happened at: 0x7f83108adf90 <_IO_vfprintf_internal+14352>: repnz scas %es:(%rdi),%al
 PC (0x7f83108adf90) ok
 source "%es:(%rdi)" (0x00000007) not located in a known VMA region (needed readable region)!
 destination "%al" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: mdbtools
StacktraceTop:
 _IO_vfprintf_internal (s=s@entry=0x7fff788ebad0, format=<optimized out>, format@entry=0x7f8311170720 "Got no result for '%s' command", ap=ap@entry=0x7fff788ebbf8) at vfprintf.c:1655
 ___vsprintf_chk (s=0x20061a0 "Got no result for '", flags=1, slen=18446744073709551615, format=0x7f8311170720 "Got no result for '%s' command", args=0x7fff788ebbf8) at vsprintf_chk.c:84
 mdb_sql_error () from /usr/lib/x86_64-linux-gnu/libmdbsql.so.2
 mdb_sql_run_query () from /usr/lib/x86_64-linux-gnu/libmdbsql.so.2
 ?? ()
Title: mdb-sql crashed with SIGSEGV in _IO_vfprintf_internal()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Boris Barbulovski (bbarbulovski-gmail) wrote :
Revision history for this message
Boris Barbulovski (bbarbulovski-gmail) wrote :

Crashes with Ubuntu 13.04 x86_64 too.

Revision history for this message
Boris Barbulovski (bbarbulovski-gmail) wrote :

Just installed Ubuntu 13.04 i386 as VirtualBox Guest OS, and mdb-sql did NOT crash.

Maybe is some x86_64 related bug.

Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 _IO_vfprintf_internal (s=s@entry=0x7fff788ebad0, format=<optimized out>, format@entry=0x7f8311170720 "Got no result for '%s' command", ap=ap@entry=0x7fff788ebbf8) at vfprintf.c:1655
 ___vsprintf_chk (s=s@entry=0x20061a0 "Got no result for '", flags=flags@entry=1, slen=slen@entry=18446744073709551615, format=format@entry=0x7f8311170720 "Got no result for '%s' command", args=args@entry=0x7fff788ebbf8) at vsprintf_chk.c:84
 vsprintf (__ap=0x7fff788ebbf8, __fmt=0x7f8311170720 "Got no result for '%s' command", __s=0x20061a0 "Got no result for '") at /usr/include/x86_64-linux-gnu/bits/stdio2.h:46
 mdb_sql_error (sql=sql@entry=0x2005950, fmt=fmt@entry=0x7f8311170720 "Got no result for '%s' command") at mdbsql.c:55
 mdb_sql_run_query (sql=sql@entry=0x2005950, querystr=0x2006e00 "select 'test';\n") at mdbsql.c:123

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in mdbtools (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
information type: Private → Private Security
information type: Private Security → Public
Revision history for this message
Boris Barbulovski (bbarbulovski-gmail) wrote :

I tested this patch and it does't crash anymore.

It appears that mdb_sql_error function outputs to stderr and char* without resetting the va_list(If resetting the va_list is legal I don't know)

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "mdb_sql_error_crash_on_amd64.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Jean-Michel Vourgère (jmv-deb) wrote :
Changed in mdbtools (Ubuntu):
status: New → Fix Committed
Changed in mdbtools (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.