<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>24839</bug_id>
          
          <creation_ts>2010-12-29 20:22:09 +0300</creation_ts>
          <short_desc>Insecure LD_LIBRARY_PATH handling in /usr/lib/openmpi/bin/mpivars.sh</short_desc>
          <delta_ts>2011-01-12 08:43:15 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>openmpi</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan A. Melnikov">iv</reporter>
          <assigned_to name="Andrew Savchenko">bircoph</assigned_to>
          <cc>bircoph</cc>
    
    <cc>dans</cc>
    
    <cc>real.altlinux.org</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116777</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2010-12-29 20:22:09 +0300</bug_when>
    <thetext>Конструкция

LD_LIBRARY_PATH=/usr/lib/openmpi/lib:$LD_LIBRARY_PATH

при отсутсвии LD_LIBRARY_PATH раскрывается в

LD_LIBRARY_PATH=foo:

что эквивалентно

LD_LIBRARY_PATH=foo:.

Это означает, библиотеки ищутся в текущем каталоге ДО системного, что может привести к проблемам в безопастности, учитывая, что многие пользователи OpenMPI добавляют 

source /usr/lib/openmpi/bin/mpivars.sh

себе в ~/.bashrc.

К сожа

Более безопастной конструкцией будет

LD_LIBRARY_PATH=/usr/lib/openmpi/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

Метод решения взят отсюда: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=451559</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116788</commentid>
    <comment_count>1</comment_count>
    <who name="Denis Pynkin">dans</who>
    <bug_when>2010-12-30 11:24:44 +0300</bug_when>
    <thetext>спасибо.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117045</commentid>
    <comment_count>2</comment_count>
    <who name="Denis Pynkin">dans</who>
    <bug_when>2011-01-11 15:24:05 +0300</bug_when>
    <thetext>task #36824</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117076</commentid>
    <comment_count>3</comment_count>
    <who name="Ivan A. Melnikov">iv</who>
    <bug_when>2011-01-12 08:43:15 +0300</bug_when>
    <thetext>спасибо</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>