Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301795 - app-i18n/fcitx strcpy overflow during build process
Summary: app-i18n/fcitx strcpy overflow during build process
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: CJK Team
URL: http://code.google.com/p/fcitx/issues...
Whiteboard:
Keywords:
: 332051 (view as bug list)
Depends on:
Blocks: fortify-source gcc-4.5
  Show dependency tree
 
Reported: 2010-01-22 02:42 UTC by Hongjiu Zhang
Modified: 2010-11-27 07:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
full build.log (app-i18n:fcitx-3.6.2:20100122-014827.log,47.32 KB, text/plain)
2010-01-22 02:43 UTC, Hongjiu Zhang
Details
Build log (fcitx-3.6.3:20100523-123009.log,52.57 KB, text/plain)
2010-05-23 14:06 UTC, Diego Elio Pettenò (RETIRED)
Details
fcitx 4.0 rc1 ebuid (fcitx-4.0_rc1.ebuild,1.37 KB, text/plain)
2010-11-10 06:44 UTC, wd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hongjiu Zhang 2010-01-22 02:42:46 UTC
Since gcc-4's ssp is still not enabled in portage, if this is INVALID, sorry for the noise.

Part of build.log:
make[2]: Entering directory `/var/tmp/portage/app-i18n/fcitx-3.6.2/work/fcitx-3.6.2/data'                             
make -C ../tools                                                                                                      
../tools/txt2mb cj.txt cj.mb                                                                                          
../tools/txt2mb erbi.txt erbi.mb                                                                                      

Reading 6726 records.

make[3]: Entering directory `/var/tmp/portage/app-i18n/fcitx-3.6.2/work/fcitx-3.6.2/tools'
make[3]: Nothing to be done for `all'.                                                    
make[3]: Leaving directory `/var/tmp/portage/app-i18n/fcitx-3.6.2/work/fcitx-3.6.2/tools' 
../tools/txt2mb wanfeng.txt wanfeng.mb                                                    
../tools/txt2mb wbpy.txt wbpy.mb                                                          

Reading 80063 records.

../tools/txt2mb qxm.txt qxm.mb

Reading 21654 records.

../tools/txt2mb db.txt db.mb

Reading 86836 records.

../tools/txt2mb wbx.txt wbx.mb

Reading 6691 records.

../tools/txt2mb zrm.txt zrm.mb

Reading 58579 records.

../tools/createPYMB ../data/gbkpy.org ../data/pyPhrase.org

Reading 99774 records.

../tools/createPYMB ../data/gbkpy.org ../data/pyPhrase.org

Reading 310609 records.

*** stack smashing detected ***: createPYMB - terminated
createPYMB: stack smashing attack in function <unknown> - terminated
Report to http://bugs.gentoo.org/                                   
make[2]: *** [pyphrase.mb] Killed                                   
make[2]: *** Deleting file `pyphrase.mb'                            
make[2]: *** Waiting for unfinished jobs....
*** stack smashing detected ***: createPYMB - terminated
createPYMB: stack smashing attack in function <unknown> - terminated
Report to http://bugs.gentoo.org/
make[2]: *** [pybase.mb] Killed
make[2]: *** Deleting file `pybase.mb'
make[2]: Leaving directory `/var/tmp/portage/app-i18n/fcitx-3.6.2/work/fcitx-3.6.2/data'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-i18n/fcitx-3.6.2/work/fcitx-3.6.2'
make: *** [all] Error 2
 * ERROR: app-i18n/fcitx-3.6.2 failed:
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 2638:  Called _eapi2_src_compile
 *     ebuild.sh, line  646:  Called die
 * The specific snippet of code:
 *              emake || die "emake failed"
 *
 * If you need support, post the output of 'emerge --info =app-i18n/fcitx-3.6.2',
 * the complete build log and the output of 'emerge -pqv =app-i18n/fcitx-3.6.2'.
 * This ebuild used the following eclasses from overlays:
 *   /var/lib/ebuild/hardened-development/eclass/flag-o-matic.eclass
 * The complete build log is located at '/var/log/portage/app-i18n:fcitx-3.6.2:20100122-014827.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-i18n/fcitx-3.6.2/temp/environment'.
 * S: '/var/tmp/portage/app-i18n/fcitx-3.6.2/work/fcitx-3.6.2'




Reproducible: Always




Portage 2.1.7.16 (hardened/linux/x86/10.0, gcc-4.4.2, glibc-2.11-r1, 2.6.31-hardened-r10 i686)
=================================================================                             
System uname: Linux-2.6.31-hardened-r10-i686-Genuine_Intel-R-_CPU_T2050_@_1.60GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 21 Jan 2010 13:30:01 +0000                                                 
app-shells/bash:     4.0_p37                                                                       
dev-java/java-config: 2.1.10                                                                       
dev-lang/python:     2.6.4, 3.1.1-r1                                                               
dev-util/cmake:      2.8.0                                                                         
sys-apps/baselayout: 2.0.1                                                                         
sys-apps/openrc:     0.6.0-r1                                                                      
sys-apps/sandbox:    2.1                                                                           
sys-devel/autoconf:  2.65                                                                          
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1                                                      
sys-devel/binutils:  2.20                                                                          
sys-devel/gcc-config: 1.4.1                                                                        
sys-devel/libtool:   2.2.6b                                                                        
virtual/os-headers:  2.6.30-r1                                                                     
ACCEPT_KEYWORDS="x86 ~x86"                                                                         
ACCEPT_LICENSE="*"                                                                                 
CBUILD="i686-pc-linux-gnu"                                                                         
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"                                              
CHOST="i686-pc-linux-gnu"                                                                          
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"                                         
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"                                                                            
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer"                                                               
DISTDIR="/var/cache/portage/distfiles"                                                                                
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --nospinner --quiet-build --with-bdeps y"                                    
FEATURES="assume-digests buildpkg distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"                                                               
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"                 
LANG="zh_TW.UTF-8"                                                                                                    
LC_ALL="en_US.UTF-8"                                                                                                  
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                     
LINGUAS="zh_TW zh af am ar as as_IN ast az be be_BY bg bn bn_BD bn_IN bo br brx bs ca crh cs csb cy da de de_FR dgo dz el en en_CA en_GB en_US en_ZA eo es es_AR es_CL es_CR es_ES es_LA es_MX et et_EE eu fa fi fo fr fr_CA fy fy_NL ga ga_IE gl gu gu_IN he hi hi_IN hne hr hsb hu hy id is it ja ka kk km kn kn_IN ko ko_KR kok ks ku la lb lo lt lv mai mk ml ml_IN mn mni mr mr_IN ms mt my nb nb_NO nds ne nl nn nn_NO no nr ns nso oc or or_IN pa pa_IN pl pt pt_BR pt_PT rm ro ru rw sa_IN sat sd se sh sh_YU si sk sl sq sr sr@latin sr@Latn sr_CS ss st sv sv_SE sw sw_TZ ta ta_IN ta_LK te te_IN tg th ti_ER tk tl tn tr ts uk ur_IN ur_PK uz uz@cyrillic ve vi wa xh zh_CN zh_HK zh_TW zu"                              
MAKEOPTS="-j3"                                                                                                        
PKGDIR="/var/cache/portage/packages"                                                                                  
PORTAGE_COMPRESS=""                                                                                                   
PORTAGE_CONFIGROOT="/"                                                                                                
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/lib/ebuild/gentoo"
PORTDIR_OVERLAY="/var/lib/ebuild/gentoo-china /var/lib/ebuild/kde /var/lib/ebuild/gentoo-china /var/lib/ebuild/haskell /var/lib/ebuild/hardened-development /var/lib/ebuild/sunrise /var/lib/ebuild/oss-overlay /var/lib/ebuild/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi bash-completion berkdb bluetooth branding bzip2 cdr cli consolekit cracklib crypt cscope cups cxx dbus doc dri dts dvd dvdr encode faac fam ffmpeg flac gdbm gif gpm graphite gstreamer hal hardened hscolour iconv ipv6 jpeg jpeg2k kde latex ldap lzma mad mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap ncurses nls nptl nptlonly nsplugin ogg openal openexr opengl openmp oss pam pcre pdf perl pic png policykit ppds pppd python qt4 quicktime readline reflection samba sdl semantic-desktop session spell spl sse sse2 ssl startup-notification svg sysfs syslog tcpd theora tiff truetype unicode urandom v4l2 vim-syntax vorbis webkit win32codecs x264 x86 xcomposite xml xorg xv xvid zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_TW zh af am ar as as_IN ast az be be_BY bg bn bn_BD bn_IN bo br brx bs ca crh cs csb cy da de de_FR dgo dz el en en_CA en_GB en_US en_ZA eo es es_AR es_CL es_CR es_ES es_LA es_MX et et_EE eu fa fi fo fr fr_CA fy fy_NL ga ga_IE gl gu gu_IN he hi hi_IN hne hr hsb hu hy id is it ja ka kk km kn kn_IN ko ko_KR kok ks ku la lb lo lt lv mai mk ml ml_IN mn mni mr mr_IN ms mt my nb nb_NO nds ne nl nn nn_NO no nr ns nso oc or or_IN pa pa_IN pl pt pt_BR pt_PT rm ro ru rw sa_IN sat sd se sh sh_YU si sk sl sq sr sr@latin sr@Latn sr_CS ss st sv sv_SE sw sw_TZ ta ta_IN ta_LK te te_IN tg th ti_ER tk tl tn tr ts uk ur_IN ur_PK uz uz@cyrillic ve vi wa xh zh_CN zh_HK zh_TW zu" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Hongjiu Zhang 2010-01-22 02:43:32 UTC
Created attachment 217129 [details]
full build.log
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-05-23 14:06:36 UTC
Created attachment 232601 [details]
Build log

And now the same applies to GCC 4.5…
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-08-10 17:25:51 UTC
*** Bug 332051 has been marked as a duplicate of this bug. ***
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2010-10-27 03:31:08 UTC
I believe this is fixed upstream by this commit:
  http://code.google.com/p/fcitx/source/detail?r=449

As I don't read Chinese I'm not even going to try to figure out what needs to be done here.
Comment 5 Hongjiu Zhang 2010-10-28 15:17:53 UTC
fcitx uses zh_CN.GBK as its backend encoding instead of the standard UTF-8, which is deprecated. The page mentioned in Comment #4 seems trying to merge the patch making fcitx using UTF-8 according to the comment there. I did not read the code.

Need to be test and close if fixed.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2010-11-07 19:41:13 UTC
Is there a fix upstream?  I have no idea what language the bug report responses are in :)
Comment 7 wd 2010-11-10 06:44:52 UTC
Created attachment 253843 [details]
fcitx 4.0 rc1 ebuid

Here is 4.0rc1 ebuild file. Hope it worked.

I've noticed fcitx will remove from portage cause of this bug. So how can be a maintainer for fcitx?
Comment 8 wd 2010-11-13 13:31:40 UTC
Update some output after install.
Here is the newest ebuild, 
https://github.com/wd/overlay/blob/master/app-i18n/fcitx/fcitx-4.0_rc1.ebuild
Comment 9 MATSUU Takuto (RETIRED) gentoo-dev 2010-11-27 07:29:23 UTC
sorry for delay. I'll maintain.

fixed in cvs.