Bug 13659 - "stack smashing detected", when Zebra indexing a subfield with a very long (1000+) word
Summary: "stack smashing detected", when Zebra indexing a subfield with a very long (1...
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 13661
  Show dependency treegraph
 
Reported: 2015-02-03 11:38 UTC by Olli-Antti Kivilahti
Modified: 2015-12-03 22:00 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2015-02-03 11:38:14 UTC
I encountered this when migrating another library group to Koha:

*** stack smashing detected ***: /usr/bin/zebraidx terminated

After a long search using the rebuild_zebra_sliced.sh I managed to isolate the culprit to a MARCXML Record with a subfield consisting of a single word with a length of ~1000 characters.

A fix for this issue is to sanitate the marc-records to not contain such silly words.
Comment 1 Olli-Antti Kivilahti 2015-02-03 11:42:51 UTC
A word of warning.
Anyone with Cataloguing-permission can nuke Koha-indexing with this subfield content:
"TÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄLTÄÄL"

Having a word like this in your DB will make full reindexing a PITA.