| Summary: | Possible Dos with funky recipe | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Armin Kuster <akuster> |
| Component: | core | Assignee: | Armin Kuster <akuster> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | High | CC: | meta.mr.watcher, meta.watcher, richard.purdie |
| Version: | 2.5.2 | ||
| Target Milestone: | 2.5.2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | backport 2.4.4 and 2.5.2 | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Armin Kuster
2018-08-12 22:47:46 UTC
Initial guess is that the LIC_FILE_CHECKSUM code is dumb and just does string splits when it should be doing a proper URL parse and resolve. (In reply to comment #1) > Initial guess is that the LIC_FILE_CHECKSUM code is dumb and just does > string splits when it should be doing a proper URL parse and resolve. it used to not be an issue and fail telling me the proper checksum. Local.conf
PACKAGE_CLASSES ?= "package_ipk package_rpm"
SDKMACHINE ?= "x86_64"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks tools-sdk"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = "1"
DL_DIR ?= "/home/akuster/oss/downloads"
SSTATE_DIR ?= "/home/build/master/sstate-cache"
SOURCE_MIRROR_URL ?= "http://downloads.yoctoproject.org/mirror/sources/"
SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/PATH"
SOURCE_MIRROR_FETCH = "1"
PACKAGE_CLASSES = "package_rpm"
SDKMACHINE ?= "x86_64"
IMAGE_FSTYPES_append = " tar.gz"
BB_TASK_NICE_LEVEL = "5"
BB_TASK_NICE_LEVEL_task-testimage = "0"
BB_TASK_IONICE_LEVEL = "2.7"
BB_TASK_IONICE_LEVEL_task-testimage = "2.1"
PREMIRRORS = ""
BB_GENERATE_MIRROR_TARBALLS = "1"
QEMU_USE_KVM = "True"
SDK_EXT_TYPE = "minimal"
SDK_INCLUDE_TOOLCHAIN = "1"
SANITY_TESTED_DISTROS = ""
fails on MACHINE=odroid-xu4 and qemux86-64 then this is a specially crafted recipe causing a DoS : ) cleaning tmp and other dirs. will try with clean env-ish no sstate-cache, tmp* or cache and it fails still. core: 3d493838f0 (origin/master, origin/HEAD) binutils: enable x86_64-pep for producing EFI binaries on x86-64 bitbake: ec037d3e (HEAD -> master, origin/master, origin/HEAD) runqueue: Allow the hash validate function to have an idea of build completion /etc/os-release NAME="Ubuntu" VERSION="18.04.1 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.1 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic I don't think its the LIC_FILES_CHKSUM. I put the correct values in and I still got the same weird console message. "S" is not correct. tried another host and got the same issue. layer with issues https://github.com/akuster/meta-demos The thousands of messages about SRC_URI are definitely LIC_FILES_CHKSUM: files://foo gets broken as method:files host:foo path:/ and then the checksum code goes to checksum / recursively. This is because file: is special and not handled the same way as other URL handlers (and gets broken to method=file, host='', path=foo). The fix I have here is to verify the method in the checksum lookup code. I believe the root cause of this is the 'files:' in the LIC_FILES_CHKSUM. Patches on the lists to handle that (and bail), and also catch a request to checksum / recursively (and bail), and improve checksumming (so checksumming / doesn't DoS the system). patches work for me. thanks Fixed in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=beb93fff65c1aa677d341c4531bf15ce46f04a69 http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a316be88cddffe448faa242536d1e6d8279554fb http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=63a4ff7cf5f7d1671ab85800bc2212dd9cd9748d Backport to sumo/rocko? backport to sumo. in stable/sumo-nmut sumo being built. in rocko. having build issues but don't think the issue is related to this bug. Changes in rocko closing |