RobertCNelson / omap-image-builder

omap image builder
http://elinux.org/BeagleBoardUbuntu
MIT License
152 stars 201 forks source link

A recent security update of git broke the setup_sdcard.sh script #189

Closed jtremesay-sereema closed 2 years ago

jtremesay-sereema commented 2 years ago

Hi,

As the title says, the fix for the CVE-2022-24765 broke the setup_sdcard.sh script:

$ sudo bash -ex setup_sdcard.sh \
    --img-2gb ${export_filename}.img \
    --dtb beaglebone \
    --distro-bootloader \
    --rootfs_label rootfs \
    --hostname wb \
    --enable-cape-universal \
    --enable-uboot-pru-rproc-54ti \
    --emmc-flasher
(snip)
+ '[' '!' xu-boot.img = x ']'
+ echo 'Backup version of u-boot (u-boot.img): /opt/backup/uboot/'
Backup version of u-boot (u-boot.img): /opt/backup/uboot/
+ mkdir -p /tmp/tmp.EdxemZpPZo/disk/opt/backup/uboot/
+ '[' u-boot/bb-u-boot-am335x-evm/u-boot.img ']'
+ cp -v ./u-boot/bb-u-boot-am335x-evm/u-boot.img /tmp/tmp.EdxemZpPZo/disk/opt/backup/uboot/u-boot.img
'./u-boot/bb-u-boot-am335x-evm/u-boot.img' -> '/tmp/tmp.EdxemZpPZo/disk/opt/backup/uboot/u-boot.img'
+ '[' -f /tmp/tmp.EdxemZpPZo/disk/etc/init.d/cpufrequtils ']'
+ '[' xam335x_evm = xbeagle_x15 ']'
+ sed -i 's/GOVERNOR="ondemand"/GOVERNOR="performance"/g' /tmp/tmp.EdxemZpPZo/disk/etc/init.d/cpufrequtils
+ '[' '!' x = xenable ']'
+ '[' '!' -f /tmp/tmp.EdxemZpPZo/disk/opt/scripts/boot/generic-startup.sh ']'
+ cd /tmp/tmp.EdxemZpPZo/disk/opt/scripts/
+ git pull
fatal: unsafe repository ('/tmp/tmp.EdxemZpPZo/disk/opt/scripts' is owned by someone else)
To add an exception for this directory, call:

    git config --global --add safe.directory /tmp/tmp.EdxemZpPZo/disk/opt/scripts
+ cleanup_keep_net_alive
+ '[' -e /proc/125998 ']'
+ kill 125998
Command exited with non-zero status 128
1.33user 6.78system 0:16.99elapsed 47%CPU (0avgtext+0avgdata 4648maxresident)k
543244inputs+1320216outputs (32major+26074minor)pagefaults 0swaps
RobertCNelson commented 2 years ago

Hi @jtremesay-sereema thanks for the report... In Bullseye i've been moving the main features of this script into packages, thus it's not really seeing updates any more.. So let's just nuke the git pull call