After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728252 - libextract-mp3.so incorrectly handles id3v24 and id3v23 headers
libextract-mp3.so incorrectly handles id3v24 and id3v23 headers
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Extractor
1.0.x
Other Linux
: Normal normal
: ---
Assigned To: Martyn Russell
tracker-extractor
: 729982 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-04-15 10:54 UTC by sridher
Modified: 2015-07-13 19:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Apply correct limitations on while() loop for MP3 v2.{3|4} tags (1.81 KB, patch)
2014-04-28 15:31 UTC, Martyn Russell
committed Details | Review

Description sridher 2014-04-15 10:54:01 UTC
I am using ubuntu 14.04 gnome3.12 from ppa's, tracker hangs at some files if i remove the file from extract path it continue to extarct n index else it is using 100% cpu but not extracting/indexing

/usr/lib/tracker/tracker-extract -V

Tracker 1.0.0


Tracker-DEBUG: Using /usr/lib/x86_64-linux-gnu/tracker-1.0/extract-modules/libextract-mp3.so...
Comment 1 sridher 2014-04-15 10:59:55 UTC
file failed to attach so, i am adding external link : https://dl.dropboxusercontent.com/u/36610068/Misc%20-%20Track%2003.mp3
Comment 2 Martyn Russell 2014-04-17 19:39:04 UTC
Indeed, this file seems to be problematic. I will take a closer look when I can!
Comment 3 sridher 2014-04-17 23:39:09 UTC
given attached file play's perfectly , not only this file some others also same; even some pdfs too. if any error accurs insted of hanging(cpu usage 99-100%) it should skip the file and continue indexing
Comment 4 Martyn Russell 2014-04-28 15:31:50 UTC
Created attachment 275357 [details] [review]
Apply correct limitations on while() loop for MP3 v2.{3|4} tags

So the test file linked to here is an id3 v23 MP3.

We're using the id3 v24 parser function for this and it seems we while() forever when parsing the tags. At some point we hit the buffer after tags are defined and continue past the end of that into the raw data.

This patch seems to fix the issue.

I would like some review first though, since this changes the logic for quite an important area of code.
Comment 5 Martyn Russell 2014-05-08 11:24:03 UTC
Comment on attachment 275357 [details] [review]
Apply correct limitations on while() loop for MP3 v2.{3|4} tags

Will be in the next release.
Comment 6 Martyn Russell 2014-05-08 11:24:16 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 7 Martyn Russell 2014-06-09 11:51:36 UTC
Reopening this bug because there have been a few issues since applying it.
I've started a new branch to handle this.

I am confident the id3v23 issues are resolved, but now need to make sure the id3v24 header parsing works, it's certainly not right as it is now.

The new branch is:

  https://git.gnome.org/browse/tracker/log/?h=mp3-id3v2-fixes
Comment 8 Martyn Russell 2014-06-09 11:52:17 UTC
*** Bug 729982 has been marked as a duplicate of this bug. ***
Comment 9 Martyn Russell 2014-06-09 11:53:19 UTC
Another file that's mentioned in bug #729982 doesn't extract properly with the original patch I used. For this other MP3 to test with, go to:

http://www.mediafire.com/listen/8359zxrq9lf1atu/Trong_Tan_-_04_-_Em_Va_Toi.mp3
Comment 10 Martyn Russell 2015-07-12 18:56:57 UTC
Hi Carlos, have we fixed this now? I spent a lot of time testing this and I think I had it working. However, I know you've been patching this area lately too.

Thanks,
Comment 11 Carlos Garnacho 2015-07-13 19:12:53 UTC
Yup :). Files in comment #9 and comment #1 are extracted just fine on master.