Compare commits

...

334 Commits

Author SHA1 Message Date
Steve Sakoman
63d05fc061 build-appliance-image: Update to dunfell head revision
(From OE-Core rev: c4fb7d1f0f157ffafd9f907f49ea74b93b2c1d40)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-15 19:16:15 -07:00
Steve Sakoman
7744221192 valgrind: skip intermittently failing ptest
Intermittent failures on autobuilder:

AssertionError: Failed ptests:
{'valgrind': ['memcheck/tests/linux/timerfd-syscall']}

(From OE-Core rev: 189628c2e3aa973ab9127924c1cf017013c7c113)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-15 19:13:22 -07:00
Steve Sakoman
7d6f83abf0 cve-exclusion_5.4.inc: update for 5.4.273
(From OE-Core rev: d056b2267428c4fe9899a7462290b10d250fc1e8)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-15 19:13:22 -07:00
Steve Sakoman
99a2caf71e build-appliance-image: Update to dunfell head revision
(From OE-Core rev: 2f8f7f417936af7d965ac13bd878d09b3029e69d)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 05:21:04 -07:00
Steve Sakoman
832b812ba8 poky.conf: bump version for 3.1.33
(From meta-yocto rev: 661edbb3138ae289bbd2925155ecf3f0d82ba52f)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:48 -07:00
Steve Sakoman
9ab80eeb28 documentation: update for 3.1.33
(From yocto-docs rev: 9d29887d17ddae6b4f33f8d0c45e49dd101524d9)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:48 -07:00
Colin McAllister
8afcb61e9b licenses.conf: Add missing LGPLv2.0+ license
Adds LGPLv2.0+ license variation to match LGPLv2+.

(From OE-Core rev: d8c2b005fce3b335a81356961f9d12db98c16493)

Signed-off-by: Colin McAllister <colin.mcallister@garmin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:47 -07:00
Bruce Ashfield
9e53801f46 linux-yocto/5.4: configuration warning fixes
Integrating the following commit(s) to linux-yocto/.:

1/2 [
    Author: Bruce Ashfield
    Email: bruce.ashfield@gmail.com
    Subject: net/cfg: remove CONFIG_NET_SCH_CBQ
    Date: Thu, 6 Jul 2023 12:39:20 -0400

    commit 051d442098421c28c7 [net/sched: Retire CBQ qdisc] removes
    CONFIG_NET_SCH_CBQ from the tree, so we drop it from our fragments.

    Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]

2/2 [
    Author: Bruce Ashfield
    Email: bruce.ashfield@gmail.com
    Subject: cfg/net: remove CONFIG_NET_SCH_DSMARK
    Date: Thu, 6 Jul 2023 12:42:07 -0400

    commit bbe77c14ee6185a61b [net/sched: Retire dsmark qdisc] upstream
    has removed CONFIG_NET_SCH_DSMARK so we drop it from our fragments
    as well.

    Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]

(From OE-Core rev: ef686e3ee6e68c11eebe3a42465225bfa6d08e0b)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:47 -07:00
Bruce Ashfield
30c2cb6ba4 linux-yocto/5.4: update to v5.4.273
Updating linux-yocto/5.4 to the latest korg -stable release that comprises
the following commits:

    24489321d0cd Linux 5.4.273
    b37f030486d5 regmap: Add missing map->bus check
    55f8ea6731aa spi: spi-mt65xx: Fix NULL pointer access in interrupt handler
    59426454b812 bpf: report RCU QS in cpumap kthread
    3ffe591b27fc rcu: add a helper to report consolidated flavor QS
    2531f907d3e4 netfilter: nf_tables: do not compare internal table flags on updates
    71002d9eb1ca ARM: dts: sun8i-h2-plus-bananapi-m2-zero: add regulator nodes vcc-dram and vcc1v2
    94cb17e5cf3a octeontx2-af: Use separate handlers for interrupts
    4f37d3a7e004 net/bnx2x: Prevent access to a freed page in page_pool
    69f9f55891ef hsr: Handle failures in module init
    f781fb5177cd rds: introduce acquire/release ordering in acquire/release_in_xmit()
    84c510411e32 packet: annotate data-races around ignore_outgoing
    889ed056eae7 hsr: Fix uninit-value access in hsr_get_node()
    48cef94b6910 s390/vtime: fix average steal time calculation
    305c31b9707d octeontx2-af: Use matching wake_up API variant in CGX command interface
    b63362b317a8 usb: gadget: net2272: Use irqflags in the call to net2272_probe_fin
    254b27c4ae2d staging: greybus: fix get_channel_from_mode() failure path
    f6bf49e76f05 serial: 8250_exar: Don't remove GPIO device on suspend
    8dd52ab78fd3 rtc: mt6397: select IRQ_DOMAIN instead of depending on it
    ca6279d1a1ee kconfig: fix infinite loop when expanding a macro at the end of file
    a8cc354a8155 tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT
    f1c9a0c33814 serial: max310x: fix syntax error in IRQ error message
    bd2f4df25945 tty: vt: fix 20 vs 0x20 typo in EScsiignore
    854ebf45a4dd afs: Revert "afs: Hide silly-rename files from userspace"
    afcbba70bf55 NFS: Fix an off by one in root_nfs_cat()
    bcc3ec2bdbda watchdog: stm32_iwdg: initialize default timeout
    e95eeb7f7d8c net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr()
    3b8415daaad2 scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn
    2b38dbd7facd RDMA/device: Fix a race between mad_client and cm_client init
    39b1af7bc99d scsi: csiostor: Avoid function pointer casts
    6d5dc96b154b ALSA: usb-audio: Stop parsing channels bits when all channels are found.
    d7ae7d126568 clk: Fix clk_core_get NULL dereference
    a1129b09228f sparc32: Fix section mismatch in leon_pci_grpci
    c8c038beb40c backlight: lp8788: Fully initialize backlight_properties during probe
    8c351a9ef5f5 backlight: lm3639: Fully initialize backlight_properties during probe
    12a0153f78c7 backlight: da9052: Fully initialize backlight_properties during probe
    1c8d8c6b4e70 backlight: lm3630a: Don't set bl->props.brightness in get_brightness
    40a89f1bc42d backlight: lm3630a: Initialize backlight_properties on init
    bb9981f915b9 powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc.
    a6e96cc26560 drm/msm/dpu: add division of drm_display_mode's hskew parameter
    41eec45c7126 powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks
    dfde84cc6c58 drm/mediatek: Fix a null pointer crash in mtk_drm_crtc_finish_page_flip
    af37aed04997 media: ttpci: fix two memleaks in budget_av_attach
    353f980a5d7a media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO
    fa83fca55cbe media: rename VFL_TYPE_GRABBER to _VIDEO
    25f576552133 media: v4l2-core: correctly validate video and metadata ioctls
    291cda0b805f media: go7007: fix a memleak in go7007_load_encoder
    fa8b472952ef media: dvb-frontends: avoid stack overflow warnings with clang
    d29ed08964ce media: pvrusb2: fix uaf in pvr2_context_set_notify
    86c10c56f253 drm/amdgpu: Fix missing break in ATOM_ARG_IMM Case of atom_get_src_int()
    23d57b99ca3f ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs
    8df143c608fc mtd: rawnand: lpc32xx_mlc: fix irq handler prototype
    d9d4d1363bb1 mtd: maps: physmap-core: fix flash size larger than 32-bit
    a8c73f0439f3 crypto: arm/sha - fix function cast warnings
    4b6569e14226 mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref
    ac1170674d54 mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref
    3472fa83d97e drm/tegra: put drm_gem_object ref on error in tegra_fb_create
    f27aaaecf747 clk: hisilicon: hi3519: Release the correct number of gates in hi3519_clk_unregister()
    44163c73b0dd PCI: Mark 3ware-9650SE Root Port Extended Tags as broken
    9b074f2ed117 drm/mediatek: dsi: Fix DSI RGB666 formats and definitions
    2e1120e48062 clk: qcom: dispcc-sdm845: Adjust internal GDSC wait times
    d2f3c762bad0 media: pvrusb2: fix pvr2_stream_callback casts
    e9d391cc70d3 media: pvrusb2: remove redundant NULL check
    013fb5051821 media: go7007: add check of return value of go7007_read_addr()
    8c2e4efe1278 media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak
    cf9580863292 perf stat: Avoid metric-only segv
    9e411c40bd1b ALSA: seq: fix function cast warnings
    a0ae3335b365 drm/radeon/ni: Fix wrong firmware size logging in ni_init_microcode()
    9df9108a9144 perf thread_map: Free strlist on normal path in thread_map__new_by_tid_str()
    79ab81939318 PCI: switchtec: Fix an error handling path in switchtec_pci_probe()
    00b07b4962fd quota: Fix rcu annotations of inode dquot pointers
    49669f8e7eb0 quota: Fix potential NULL pointer dereference
    ff29b5f9f019 quota: simplify drop_dquot_ref()
    68435ffc1c1a clk: qcom: reset: Ensure write completion on reset de/assertion
    026d3984a169 clk: qcom: reset: Commonize the de/assert functions
    48846ddc715c clk: qcom: reset: support resetting multiple bits
    7f82802d47b0 clk: qcom: reset: Allow specifying custom reset delay
    f20c3270f3ed media: edia: dvbdev: fix a use-after-free
    0175f2d34c85 media: v4l2-mem2mem: fix a memleak in v4l2_m2m_register_entity
    8269ab16415f media: v4l2-tpg: fix some memleaks in tpg_alloc
    2e6892b2be82 media: em28xx: annotate unchecked call to media_device_register()
    639155da9bd1 perf evsel: Fix duplicate initialization of data->id in evsel__parse_sample()
    e019d87e02f1 drm/amd/display: Fix potential NULL pointer dereferences in 'dcn10_set_output_transfer_func()'
    1d4d67417353 perf record: Fix possible incorrect free in record__switch_output()
    adc8a9167660 PCI/DPC: Print all TLP Prefixes, not just the first
    daf21394f989 media: tc358743: register v4l2 async device only after successful setup
    ba34d8a5aa85 dmaengine: tegra210-adma: Update dependency to ARCH_TEGRA
    cc31a90eb79f drm/rockchip: lvds: do not overwrite error code
    f1dfd026cdb5 drm: Don't treat 0 as -1 in drm_fixp2int_ceil
    b061b28b66c6 drm/rockchip: inno_hdmi: Fix video timing
    91dc47cd72f2 drm/tegra: output: Fix missing i2c_put_adapter() in the error handling paths of tegra_output_probe()
    030d46f85971 drm/tegra: dsi: Fix missing pm_runtime_disable() in the error handling path of tegra_dsi_probe()
    b4cb57ec2c2b drm/tegra: dsi: Fix some error handling paths in tegra_dsi_probe()
    e04e773fb868 drm/tegra: dsi: Make use of the helper function dev_err_probe()
    85f28e98c5e8 gpu: host1x: mipi: Update tegra_mipi_request() to be node based
    f05631a8525c drm/tegra: dsi: Add missing check for of_find_device_by_node
    da7ece219710 dm: call the resume method on internal suspend
    6070692ea3e6 dm raid: fix false positive for requeue needed during reshape
    3b1e8a617eb0 nfp: flower: handle acti_netdevs allocation failure
    e06f0d3f66e5 net/x25: fix incorrect parameter validation in the x25_getsockopt() function
    26843eefcfdd net: kcm: fix incorrect parameter validation in the kcm_getsockopt) function
    b9979cae626f udp: fix incorrect parameter validation in the udp_lib_getsockopt() function
    1bd08e531473 l2tp: fix incorrect parameter validation in the pppol2tp_getsockopt() function
    2e7f3cabc698 tcp: fix incorrect parameter validation in the do_tcp_getsockopt() function
    fb6639c7489b net: hns3: fix port duplex configure error in IMP reset
    ec6bb01e02cb net: ip_tunnel: make sure to pull inner header in ip_tunnel_rcv()
    a9f5faf28e30 ipv6: fib6_rules: flush route cache when rule is changed
    21e5fa4688e1 bpf: Fix stackmap overflow check on 32-bit arches
    92c81fbb3ed2 bpf: Fix hashtab overflow check on 32-bit arches
    8a8b6a24684b sr9800: Add check for usbnet_get_endpoints
    54a03e4ac1a4 Bluetooth: hci_core: Fix possible buffer overflow
    f6177a17236f Bluetooth: Remove superfluous call to hci_conn_check_pending()
    03df15b579fc igb: Fix missing time sync events
    141897c5b0d4 igb: move PEROUT and EXTTS isr logic to separate functions
    8081d80a9255 mmc: wmt-sdmmc: remove an incorrect release_mem_region() call in the .remove function
    bfa9d86d39a0 SUNRPC: fix some memleaks in gssx_dec_option_array
    52018aa146e3 x86, relocs: Ignore relocations in .notes section
    450ac90ed453 ACPI: scan: Fix device check notification handling
    33b498a123af ARM: dts: imx6dl-yapp4: Move the internal switch PHYs under the switch node
    0655698da80a ARM: dts: imx6dl-yapp4: Fix typo in the QCA switch register address
    8deafa61fbdc ARM: dts: imx6dl-yapp4: Move phy reset into switch node
    174e3c8ee7de ARM: dts: arm: realview: Fix development chip ROM compatible value
    de8abc894bbe net: ena: Remove ena_select_queue
    f434eacad6bd net: ena: cosmetic: fix line break issues
    a4fc14a6623d wifi: brcmsmac: avoid function pointer casts
    6234e09e692e iommu/amd: Mark interrupt as managed
    073b5bbb1361 bus: tegra-aconnect: Update dependency to ARCH_TEGRA
    ea96bf3f8062 ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit()
    2eb2a5d6f5ed arm64: dts: qcom: msm8996: Pad addresses
    a8f365065671 arm64: dts: qcom: msm8996: Move regulator consumers to db820c
    1f685fa06c5e arm64: dts: qcom: msm8996: Use node references in db820c
    adcf4eeb34de arm64: dts: qcom: db820c: Move non-soc entries out of /soc
    6bbbd2fd086a bpf: Mark bpf_spin_{lock,unlock}() helpers with notrace correctly
    6f51d61a4383 bpf: Factor out bpf_spin_lock into helpers.
    cf0d888ea7a1 bpf: Add typecast to bpf helpers to help BTF generation
    e1f7fef6e224 arm64: dts: mediatek: mt7622: add missing "device_type" to memory nodes
    bea9573c795a wifi: libertas: fix some memleaks in lbs_allocate_cmd_buffer()
    6fd90614971b net: blackhole_dev: fix build warning for ethh set but not used
    ef036a0598fa af_unix: Annotate data-race of gc_in_progress in wait_for_unix_gc().
    4bdfc38a983d sock_diag: annotate data-races around sock_diag_handlers[family]
    76ac9c141e10 wifi: mwifiex: debugfs: Drop unnecessary error check for debugfs_create_dir()
    e556006de4ea wifi: wilc1000: fix RCU usage in connect path
    1bda3ff1fdb7 wifi: wilc1000: fix declarations ordering
    8c6210d175eb wifi: b43: Disable QoS for bcm4331
    12062b149f29 wifi: b43: Stop correct queue in DMA worker when QoS is disabled
    c668f0f8255d b43: main: Fix use true/false for bool type
    47ec637b118f wifi: b43: Stop/wake correct queue in PIO Tx path when QoS is disabled
    31aaf17200c3 wifi: b43: Stop/wake correct queue in DMA Tx path when QoS is disabled
    801be44049f8 b43: dma: Fix use true/false for bool type variable
    88a9dffaec77 wifi: ath10k: fix NULL pointer dereference in ath10k_wmi_tlv_op_pull_mgmt_tx_compl_ev()
    be269709808c timekeeping: Fix cross-timestamp interpolation for non-x86
    fee4e84c4ea2 timekeeping: Fix cross-timestamp interpolation corner case decision
    7cec7d83882c timekeeping: Fix cross-timestamp interpolation on counter wrap
    1a54aa506b3b aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts
    72dacc72b25c fs/select: rework stack allocation hack for clang
    44214d744be3 nbd: null check for nla_nest_start
    772a7def9868 do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak
    3f6186cc654c ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll
    9f27f4d5d1f4 ASoC: wm8962: Enable both SPKOUTR_ENA and SPKOUTL_ENA in mono mode
    f1d3be9eb980 ASoC: wm8962: Enable oscillator if selecting WM8962_FLL_OSC
    5f3c13930bda Input: gpio_keys_polled - suppress deferred probe error for gpio
    fa14a1537362 ASoC: Intel: bytcr_rt5640: Add an extra entry for the Chuwi Vi8 tablet
    da17f556ad18 firewire: core: use long bus reset on gap count error
    5f369efd9d96 Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security
    6e9c11399240 scsi: mpt3sas: Prevent sending diag_reset when the controller is ready
    2daa2a8e895e btrfs: fix data race at btrfs_use_block_rsv() when accessing block reserve
    890a1b31fa2b dm-verity, dm-crypt: align "struct bvec_iter" correctly
    5d8afc25c771 block: sed-opal: handle empty atoms when parsing response
    745718d00f13 parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check
    b43b1a706233 net/iucv: fix the allocation size of iucv_path_table array
    c411a3c828de RDMA/mlx5: Relax DEVX access upon modify commands
    69dd0a99daff HID: multitouch: Add required quirk for Synaptics 0xcddc device
    7d7fa0bea3bf MIPS: Clear Cause.BD in instruction_pointer_set
    025a8a96c7ef x86/xen: Add some null pointer checking to smp.c
    4c00abb52a24 ASoC: rt5645: Make LattePanda board DMI match more precise
    ef5de5d5057f selftests: tls: use exact comparison in recv_partial
    cfb24022bb2c io_uring: drop any code related to SCM_RIGHTS
    2692b8a01667 io_uring/unix: drop usage of io_uring socket
    84075826304f Linux 5.4.272
    345ced405207 arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts
    1b3d8cbd1cae arm64: dts: qcom: add PDC interrupt controller for SDM845
    59b3583da128 serial: max310x: fix IO data corruption in batched operations
    f5c252aaa1be serial: max310x: implement I2C support
    112094efd6fb serial: max310x: make accessing revision id interface-agnostic
    b96b01791911 regmap: Add bulk read/write callbacks into regmap_config
    758c6799da46 regmap: allow to define reg_update_bits for no bus configuration
    9a7bbea2666c serial: max310x: Unprepare and disable clock in error path
    664a6a904afe getrusage: use sig->stats_lock rather than lock_task_sighand()
    2b34f6038350 getrusage: use __for_each_thread()
    c50a0594312c getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand()
    ef8a8b36a16b getrusage: add the "signal_struct *sig" local variable
    f184f2197832 y2038: rusage: use __kernel_old_timeval
    c7441c77c91e hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed
    f2ab3eaa6470 hv_netvsc: use netif_is_bond_master() instead of open code
    9b5ef7a52896 hv_netvsc: Make netvsc/VF binding check both MAC and serial number
    5402ec577f9d Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU
    bf6bb3612e5d serial: max310x: prevent infinite while() loop in port startup
    7e30e5c1439b serial: max310x: use a separate regmap for each port
    3fb7c9bcd0c1 serial: max310x: use regmap methods for SPI batch operations
    2c9c830d74a7 serial: max310x: Make use of device properties
    b765176ae1b9 serial: max310x: fail probe if clock crystal is unstable
    816700131e8b serial: max310x: Try to get crystal clock rate from property
    c76dcad53ba1 serial: max310x: Use devm_clk_get_optional() to get the input clock
    b569d91e5180 um: allow not setting extra rpaths in the linux binary
    47c68edecca2 selftests: mm: fix map_hugetlb failure on 64K page size systems
    f9055fa2b293 netrom: Fix data-races around sysctl_net_busy_read
    07bbccd1adb5 netrom: Fix a data-race around sysctl_netrom_link_fails_count
    c4309e5f8e80 netrom: Fix a data-race around sysctl_netrom_routing_control
    cbba77abb4a5 netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout
    89aa78a34340 netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size
    1f60795dcafc netrom: Fix a data-race around sysctl_netrom_transport_busy_delay
    80578681ea27 netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay
    f716a6823424 netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries
    eadec8da4451 netrom: Fix a data-race around sysctl_netrom_transport_timeout
    eda02a0bed55 netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser
    1e84b108f2a7 netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser
    7f615232556f netrom: Fix a data-race around sysctl_netrom_default_path_quality
    4bafcc43baf7 netfilter: nf_conntrack_h323: Add protection for bmp length out of range
    6ec303202229 netfilter: nft_ct: fix l3num expectations with inet pseudo family
    997efea2bf3a net/rds: fix WARNING in rds_conn_connect_if_down
    664f9c647260 net/ipv6: avoid possible UAF in ip6_route_mpath_notify()
    d9fefc511331 net: ice: Fix potential NULL pointer dereference in ice_bridge_setlink()
    59d2a4076983 geneve: make sure to pull inner header in geneve_rx()
    a248b1f58a70 ixgbe: {dis, en}able irqs in ixgbe_txrx_ring_{dis, en}able
    7f087784692d net: lan78xx: fix runtime PM count underflow on link stop
    81934a2ab51d lan78xx: Fix race conditions in suspend/resume handling
    57b9c48cd534 lan78xx: Fix partial packet errors on suspend/resume
    e68b46e9aa0e lan78xx: Add missing return code checks
    b1cc23ffe1a2 lan78xx: Fix white space and style issues
    3fec063b052e Linux 5.4.271
    9162730a83ed gpio: 74x164: Enable output pins after registers are reset
    1dde8ef4b7a7 fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super
    037d5a949b04 cachefiles: fix memory leak in cachefiles_add_cache()
    ace0fdf796bf x86/cpu/intel: Detect TME keyid bits before setting MTRR mask registers
    9d660e5adf28 mmc: core: Fix eMMC initialization with 1-bit bus connection
    3cc5fb824c21 dmaengine: fsl-qdma: init irq after reg initialization
    518d78b4fac6 dmaengine: fsl-qdma: fix SoC may hang on 16 byte unaligned read
    c6652e20d7d7 btrfs: dev-replace: properly validate device names
    0cfbb26ee5e7 wifi: nl80211: reject iftype change with mesh ID change
    ec92aa2cab6f gtp: fix use-after-free and null-ptr-deref in gtp_newlink()
    5c78be006ed9 afs: Fix endless loop in directory parsing
    26dda65b096c ALSA: Drop leftover snd-rtctimer stuff from Makefile
    7394abc8926a power: supply: bq27xxx-i2c: Do not free non existing IRQ
    950d4d74d311 efi/capsule-loader: fix incorrect allocation size
    b9fbc44159df rtnetlink: fix error logic of IFLA_BRIDGE_FLAGS writing back
    260410c589e2 netfilter: nf_tables: allow NFPROTO_INET in nft_(match/target)_validate()
    20f6f150e126 Bluetooth: Enforce validation on max value of connection interval
    79820a7e1e05 Bluetooth: hci_event: Fix handling of HCI_EV_IO_CAPA_REQUEST
    98fb98fd37e4 Bluetooth: Avoid potential use-after-free in hci_error_reset
    6e0000a43293 net: usb: dm9601: fix wrong return value in dm9601_mdio_read
    69624e28d640 lan78xx: enable auto speed configuration for LAN7850 if no EEPROM is detected
    9d4ffb5b9d87 ipv6: fix potential "struct net" leak in inet6_rtm_getaddr()
    f5f11f7e2872 tun: Fix xdp_rxq_info's queue_index when detaching
    f81e94d2dcd2 net: ip_tunnel: prevent perpetual headroom growth
    9ae51361da43 netlink: Fix kernel-infoleak-after-free in __skb_datagram_iter
    e133c1ee6d72 Linux 5.4.270
    7a54338219f0 scripts/bpf: Fix xdp_md forward declaration typo
    b4eea7a05ee0 fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio
    c28fc1aa6f82 drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set
    29db9725f276 drm/syncobj: make lockdep complain on WAIT_FOR_SUBMIT v3
    ae4360cbd385 netfilter: nf_tables: set dormant flag on hook register failure
    f310143961e2 tls: stop recv() if initial process_rx_list gave us non-DATA
    a26742ada7ee tls: rx: drop pointless else after goto
    c1287c1d6b55 tls: rx: jump to a more appropriate label
    06de2302549f s390: use the correct count for __iowrite64_copy()
    7eee00feb60d packet: move from strlcpy with unused retval to strscpy
    82831e3ff76e ipv6: sr: fix possible use-after-free and null-ptr-deref
    5c27d85a69fa afs: Increase buffer size in afs_update_volume_status()
    799a4afaa54c ipv6: properly combine dev_base_seq and ipv6.dev_addr_genid
    5888f3424907 ipv4: properly combine dev_base_seq and ipv4.dev_addr_genid
    a50cb1d6f350 nouveau: fix function cast warnings
    fe031dfcea8d scsi: jazz_esp: Only build if SCSI core is builtin
    dd90af71fa7a bpf, scripts: Correct GPL license name
    1f18b5bb4511 scripts/bpf: teach bpf_helpers_doc.py to dump BPF helper definitions
    48ebca0a117b RDMA/srpt: fix function pointer cast warnings
    310763377471 RDMA/srpt: Make debug output more detailed
    6e461952df6e RDMA/bnxt_re: Return error for SRQ resize
    cecfb90cf71d IB/hfi1: Fix a memleak in init_credit_return
    bbcf72333b13 usb: roles: don't get/set_role() when usb_role_switch is unregistered
    a31cf46d108d usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs
    aad6132ae6e4 usb: cdns3: fix memory double free when handle zero packet
    cfa9abb5570c usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable()
    999a8bb70da2 ARM: ep93xx: Add terminator to gpiod_lookup_table
    c1d3a84a67db l2tp: pass correct message length to ip6_append_data
    caf4a67c0131 PCI/MSI: Prevent MSI hardware interrupt number truncation
    f8cbd1791900 gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()
    0dccbb93538f dm-crypt: don't modify the data when using authenticated encryption
    5833024a9856 IB/hfi1: Fix sdma.h tx->num_descs off-by-one error
    6ede985c6b56 PCI: tegra: Fix OF node reference leak
    e04a2afd081f PCI: tegra: Fix reporting GPIO error value
    e3fc08091148 arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
    efd63c23a4bb drm/amdgpu: Fix type of second parameter in trans_msg() callback
    f691ab24cf19 iomap: Set all uptodate bits for an Uptodate page
    45227ae32f23 dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
    3770c38cd6a6 x86/alternatives: Disable KASAN in apply_alternatives()
    f45dc10a3c87 drm/amdgpu: Check for valid number of registers to read
    90aa9135a472 Revert "drm/sun4i: dsi: Change the start delay calculation"
    7000efb6d8bc ALSA: hda/realtek - Enable micmute LED on and HP system
    82c53047fe8c selftests/bpf: Avoid running unprivileged tests with alignment requirements
    81e03f638dd4 net: bridge: clear bridge's private skb space on xmit
    82174d6bd79f spi: mt7621: Fix an error message in mt7621_spi_probe()
    954a7a0011d9 pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups
    759756e2cfaf pinctrl: pinctrl-rockchip: Fix a bunch of kerneldoc misdemeanours
    99dc56854559 tcp: add annotations around sk->sk_shutdown accesses
    41ca93861627 tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit
    5a9dc14df2ef tcp: factor out __tcp_close() helper
    d42867642006 pmdomain: renesas: r8a77980-sysc: CR7 must be always on
    3bc35da66722 s390/qeth: Fix potential loss of L3-IP@ in case of network issues
    b7bfaea8f5ec virtio-blk: Ensure no requests in virtqueues before deleting vqs.
    d124ab01fc5c firewire: core: send bus reset promptly on gap count error
    b5854f923d41 scsi: lpfc: Use unsigned type for num_sge
    60635f8a0542 hwmon: (coretemp) Enlarge per package core count limit
    6d338fb1a1f6 nvmet-fc: abort command when there is no binding
    ac524b7b3f4e netfilter: conntrack: check SCTP_CID_SHUTDOWN_ACK for vtag setting in sctp_new
    6f5015ce25e6 ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616
    c3a25d4fdd9a nvmet-tcp: fix nvme tcp ida memory leak
    5068cb91ed0c regulator: pwm-regulator: Add validity checks in continuous .get_voltage
    6b92b1bc16d6 ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()
    260fc96283c0 ext4: avoid allocating blocks from corrupted group in ext4_mb_try_best_found()
    bccb418eba5e ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers
    e896bf487871 ahci: asm1166: correct count of reported ports
    6db07619d173 fbdev: sis: Error out if pixclock equals zero
    84dce0f6a4cc fbdev: savage: Error out if pixclock equals zero
    85720b69aef1 wifi: mac80211: fix race condition on enabling fast-xmit
    d3032de2c830 wifi: cfg80211: fix missing interfaces when dumping
    bb3813a6a755 dmaengine: fsl-qdma: increase size of 'irq_name'
    a7229c75c357 dmaengine: shdma: increase size of 'dev_id'
    11f3fe5001ed scsi: target: core: Add TMF to tmr_list handling
    d2fc4134aa06 sched/rt: Disallow writing invalid values to sched_rt_period_us
    b69677bfd77d sched/rt: Fix sysctl_sched_rr_timeslice intial value
    429aaf144b07 userfaultfd: fix mmap_changing checking in mfill_atomic_hugetlb
    b0911b8d37cd nilfs2: replace WARN_ONs for invalid DAT metadata block requests
    febd74320015 memcg: add refcnt for pcpu stock to avoid UAF problem in drain_all_stock()
    d7b5bdb52d60 sched/rt: sysctl_sched_rr_timeslice show default timeslice after reset
    010dc505eab3 net/sched: Retire dsmark qdisc
    40e8abb86d96 net/sched: Retire ATM qdisc
    493685f3dddd net/sched: Retire CBQ qdisc
    9d17e7350403 KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler
    68799371c9c1 KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
    6e1f54a4985b Linux 5.4.269
    e9aa8e5a72bd of: gpio unittest kfree() wrong object
    6ac8965955fa of: unittest: fix EXPECT text for gpio hog errors
    7dd275ce3b9a net: bcmgenet: Fix EEE implementation
    10c586da9f17 Revert "Revert "mtd: rawnand: gpmi: Fix setting busy timeout setting""
    25b42be4e067 netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()
    3dd76bebcd59 lsm: new security_file_ioctl_compat() hook
    efdf644062db drm/msm/dsi: Enable runtime PM
    fef59ee6c057 PM: runtime: Have devm_pm_runtime_enable() handle pm_runtime_dont_use_autosuspend()
    835ed5effb60 PM: runtime: add devm_pm_runtime_enable helper
    d31c8721e816 nilfs2: fix potential bug in end_buffer_async_write
    2441a64070b8 sched/membarrier: reduce the ability to hammer on sys_membarrier
    cd1022eaf87b net: prevent mss overflow in skb_segment()
    6587af96effb netfilter: ipset: Missing gc cancellations fixed
    c7f2733e5011 netfilter: ipset: fix performance regression in swap operation
    d04acadb6490 KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache
    4705a9fc50f3 mips: Fix max_mapnr being uninitialized on early stages
    5e0854b60a96 arch, mm: remove stale mentions of DISCONIGMEM
    c324e2716de3 bus: moxtet: Add spi device table
    7f71d9817cea Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d"
    60e092289c49 tracing: Inform kmemleak of saved_cmdlines allocation
    fbe86124b7d6 pmdomain: core: Move the unused cleanup to a _sync initcall
    08de58abedf6 can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER)
    a257ffde374a irqchip/irq-brcmstb-l2: Add write memory barrier before exit
    91a7c002351d nfp: flower: prevent re-adding mac index for bonded port
    b22c9a37c75a nfp: use correct macro for LengthSelect in BAR config
    862ee4422c38 nilfs2: fix hang in nilfs_lookup_dirty_data_buffers()
    a6efe6dbaaf5 nilfs2: fix data corruption in dsync block recovery for small block sizes
    6ce7d5e6d246 ALSA: hda/conexant: Add quirk for SWS JS201D
    6b8bdc509eee mmc: slot-gpio: Allow non-sleeping GPIO ro
    4f2fde50517d x86/mm/ident_map: Use gbpages only where full GB page should be mapped.
    4c7b1d08ad56 x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6
    ed14ab2611be serial: max310x: improve crystal stable clock detection
    5814a9045c61 serial: max310x: set default value when reading clock ready bit
    ef60665ea981 ring-buffer: Clean ring_buffer_poll_wait() error return
    7200170e88e3 iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC
    720d0112b39b staging: iio: ad5933: fix type mismatch regression
    77e7a316cd8d tracing: Fix wasted memory in saved_cmdlines logic
    afbcad9ae7d6 ext4: fix double-free of blocks due to wrong extents moved_len
    15238f4b21a0 misc: fastrpc: Mark all sessions as invalid in cb_remove
    42beab162dce binder: signal epoll threads of self-work
    93a52449fe9d ALSA: hda/realtek: Enable headset mic on Vaio VJFE-ADL
    9086b27eac64 xen-netback: properly sync TX responses
    71349abe3aba nfc: nci: free rx_data_reassembly skb on NCI device cleanup
    4ae191effbc1 kbuild: Fix changing ELF file type for output of gen_btf for big endian
    750a4e599930 firewire: core: correct documentation of fw_csr_string() kernel API
    2209fc6e3d77 scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock"
    d074d5ff5ae7 i2c: i801: Fix block process call transactions
    4de1489d8092 i2c: i801: Remove i801_set_block_buffer_mode
    df112ccb9b12 usb: f_mass_storage: forbid async queue when shutdown happen
    addaa8627fcd USB: hub: check for alternate port before enabling A_ALT_HNP_SUPPORT
    dbaca8fa9ec2 HID: wacom: Do not register input devices until after hid_hw_start
    e13bed5cfe02 HID: wacom: generic: Avoid reporting a serial of '0' to userspace
    1f12e4b3284d mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again
    8ffd5590f4d6 tracing/trigger: Fix to return error if failed to alloc snapshot
    a67f1f83f315 i40e: Fix waiting for queues of all VSIs to be disabled
    9a3a82affa1c MIPS: Add 'memory' clobber to csum_ipv6_magic() inline assembler
    422d5243b9f7 ASoC: rt5645: Fix deadlock in rt5645_jack_detect_work()
    91b48c633969 spi: ppc4xx: Drop write-only variable
    61da1f41d0b5 of: unittest: Fix compile in the non-dynamic case
    f6997a2416b0 of: unittest: add overlay gpio test to catch gpio hog problem
    89485251f687 btrfs: send: return EOPNOTSUPP on unknown flags
    863837df8a94 btrfs: forbid deleting live subvol qgroup
    d25031ba2a40 btrfs: forbid creating subvol qgroups
    10e9cb393136 netfilter: nft_set_rbtree: skip end interval element from gc
    7fde2acc6d4b net: stmmac: xgmac: fix a typo of register name in DPP safety handling
    b9ff931f0019 net: stmmac: xgmac: use #define for string constants
    88c7e1e7a6b8 vhost: use kzalloc() instead of kmalloc() followed by memset()
    09e77c7d671d Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID
    a012efe0df04 hrtimer: Report offline hrtimer enqueue
    4a589de93cfc USB: serial: cp210x: add ID for IMST iM871A-USB
    cd0ab7f2a824 USB: serial: option: add Fibocom FM101-GL variant
    896695af51a5 USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e
    11ca9624cca8 net/af_iucv: clean up a try_then_request_module()
    1c7488156e9a netfilter: nft_ct: reject direction for ct id
    8e2a84c6daaf netfilter: nft_compat: restrict match/target protocol to u16
    f139a4c6d209 netfilter: nft_compat: reject unused compat flag
    56fae81633cc ppp_async: limit MRU to 64K
    6f70f0b41245 tipc: Check the bearer type before calling tipc_udp_nl_bearer_add()
    ef1f56f2cd9f rxrpc: Fix response to PING RESPONSE ACKs to a dead call
    5993f121fbc0 inet: read sk->sk_family once in inet_recv_error()
    7c96975c24cf hwmon: (coretemp) Fix bogus core_id to attr name mapping
    1eb74c00c9c3 hwmon: (coretemp) Fix out-of-bounds memory access
    51d76b723021 hwmon: (aspeed-pwm-tacho) mutex for tach reading
    df0965935aa7 atm: idt77252: fix a memleak in open_card_ubr0
    a0ac20fd5329 selftests: net: avoid just another constant wait
    e9837c83befb net: stmmac: xgmac: fix handling of DPP safety error for DMA channels
    8398d8d735ee phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP
    0cb90f27a347 dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV
    6ff482731530 phy: renesas: rcar-gen3-usb2: Fix returning wrong error code
    1c75fe450b52 dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA
    c26360941643 dmaengine: fsl-qdma: Fix a memory leak related to the status queue DMA
    817bedcd7f32 bonding: remove print in bond_verify_device_path
    e95120698b51 HID: apple: Add 2021 magic keyboard FN key mapping
    5991ab8940c1 HID: apple: Swap the Fn and Left Control keys on Apple keyboards
    6d4771ab2d9e HID: apple: Add support for the 2021 Magic Keyboard
    67f56ef9e114 net: sysfs: Fix /sys/class/net/<iface> path
    b169ffde733c af_unix: fix lockdep positive in sk_diag_dump_icons()
    b3dace37f116 net: ipv4: fix a memleak in ip_setup_cork
    f549f340c91f netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations
    06608603faed netfilter: nf_log: replace BUG_ON by WARN_ON_ONCE when putting logger
    64babb17e815 llc: call sock_orphan() at release time
    2a09d1784c47 ipv6: Ensure natural alignment of const ipv6 loopback and router addresses
    7f1a24914b6d ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550()
    a10e95d6cf40 ixgbe: Refactor overtemp event handling
    2d533ddca21d ixgbe: Refactor returning internal error codes
    980c806f673c ixgbe: Remove non-inclusive language
    7c03b7486597 net: remove unneeded break
    b81f679ac561 scsi: isci: Fix an error code problem in isci_io_request_build()
    12f58dce48cf wifi: cfg80211: fix RCU dereference in __cfg80211_bss_update
    ad2bd6cd17c3 perf: Fix the nr_addr_filters fix
    34da3b9fa508 drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'
    6ab4fd508fad ceph: fix deadlock or deadcode of misusing dget()
    ecd7744a1446 blk-mq: fix IO hang from sbitmap wakeup race
    977105472f81 virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings
    884b746209ed libsubcmd: Fix memory leak in uniq()
    3e06e9b906bc PCI/AER: Decode Requester ID when no error info found
    133bf750d75e fs/kernfs/dir: obey S_ISGID
    17c252f19270 usb: hub: Replace hardcoded quirk value with BIT() macro
    d8c293549946 PCI: switchtec: Fix stdev_release() crash after surprise hot remove
    a32a24da0e1b PCI: Only override AMD USB controller if required
    e2048eb3cbdd mfd: ti_am335x_tscadc: Fix TI SoC dependencies
    838cbe01db12 i3c: master: cdns: Update maximum prescaler value for i2c clock
    a6946682ddcb um: net: Fix return type of uml_net_start_xmit()
    c8115f2bd8ef um: Don't use vfprintf() for os_info()
    735a29ce08ab um: Fix naming clash between UML and scheduler
    ddd1f258f0d3 leds: trigger: panic: Don't register panic notifier if creating the trigger failed
    9052b3e0e789 drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()'
    548f9a37d777 drm/amdgpu: Let KFD sync with VM fences
    15d674571af0 clk: mmp: pxa168: Fix memory leak in pxa168_clk_init()
    105444e207d4 clk: hi3620: Fix memory leak in hi3620_mmc_clk_init()
    8a96f1caf1f4 drm/msm/dpu: Ratelimit framedone timeout msgs
    4d181fe96646 media: ddbridge: fix an error code problem in ddb_probe
    615e3adc2042 IB/ipoib: Fix mcast list locking
    fb703d31fde5 drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time
    c1b2e5e83772 ALSA: hda: Intel: add HDA_ARL PCI ID support
    c91bda92fbb1 PCI: add INTEL_HDA_ARL to pci_ids.h
    fbbee078cfb6 media: rockchip: rga: fix swizzling for RGB formats
    acb1bffe5fac media: stk1160: Fixed high volume of stk1160_dbg messages
    67997250d321 drm/mipi-dsi: Fix detach call without attach
    d778e10dde4f drm/framebuffer: Fix use of uninitialized variable
    da980f8db04e drm/drm_file: fix use of uninitialized variable
    00a5feb0603f RDMA/IPoIB: Fix error code return in ipoib_mcast_join
    b0f907a4efeb fast_dput(): handle underflows gracefully
    12ba5b9cf87c ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument
    9fceaf8182d4 f2fs: fix to check return value of f2fs_reserve_new_block()
    52240224e74a wifi: cfg80211: free beacon_ies when overridden from hidden BSS
    18c2989c30b1 wifi: rtlwifi: rtl8723{be,ae}: using calculate_bit_shift()
    8ec36f2d0cb6 wifi: rtl8xxxu: Add additional USB IDs for RTL8192EU devices
    f3b7a31bf115 arm64: dts: qcom: msm8998: Fix 'out-ports' is a required property
    c3f22192a2b3 arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property
    351b37b88ed0 md: Whenassemble the array, consult the superblock of the freshest device
    6f2cd02ff5b2 block: prevent an integer overflow in bvec_try_merge_hw_page
    fb9c25ea0a5f ARM: dts: imx23/28: Fix the DMA controller node name
    c48e75a7ee24 ARM: dts: imx23-sansa: Use preferred i2c-gpios properties
    83b1cceca9b0 ARM: dts: imx27-apf27dev: Fix LED name
    06c3f5920fe9 ARM: dts: imx25/27: Pass timing0
    826e8fa48e0f ARM: dts: imx1: Fix sram node
    05f309a3fae0 ARM: dts: imx27: Fix sram node
    1e35a4cf5a64 ARM: dts: imx: Use flash@0,0 pattern
    30cfab1c8c7e ARM: dts: imx25/27-eukrea: Fix RTC node name
    ca14da9a1eca ARM: dts: rockchip: fix rk3036 hdmi ports node
    e9ac3e3398a5 scsi: libfc: Fix up timeout error in fc_fcp_rec_error()
    f5a875051e48 scsi: libfc: Don't schedule abort twice
    eb6f68ec92ab bpf: Add map and need_defer parameters to .map_fd_put_ptr()
    f11f0fd1ad6c wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus()
    53dd674b3238 ARM: dts: imx7s: Fix nand-controller #size-cells
    a86ce3671d4a ARM: dts: imx7s: Fix lcdif compatible
    183edc0ad297 ARM: dts: imx7d: Fix coresight funnel ports
    6c50e561ce97 bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk
    4d981d9224df PCI: Add no PM reset quirk for NVIDIA Spectrum devices
    0e8c8aa8e3ce scsi: lpfc: Fix possible file string name overflow when updating firmware
    cbd0b6268a77 selftests/bpf: Fix pyperf180 compilation failure with clang18
    982bdaa0fcbd selftests/bpf: satisfy compiler by having explicit return in btf test
    e1f113b57ddd wifi: rt2x00: restart beacon queue when hardware reset
    b183fe8702e7 ext4: avoid online resizing failures due to oversized flex bg
    92c3c5cfed57 ext4: remove unnecessary check from alloc_flex_gd()
    7cb19e13362b ext4: unify the type of flexbg_size to unsigned int
    360c28a2fd31 ext4: fix inconsistent between segment fstrim and full fstrim
    ec1075549613 ecryptfs: Reject casefold directory inodes
    7a96d85bf196 SUNRPC: Fix a suspicious RCU usage warning
    5e63c9ae8055 KVM: s390: fix setting of fpc register
    6d0822f2cc9b s390/ptrace: handle setting of fpc register correctly
    de6a91aed1e0 jfs: fix array-index-out-of-bounds in diNewExt
    592d29eb6bd9 rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock()
    f4a0b57632fa afs: fix the usage of read_seqbegin_or_lock() in afs_find_server*()
    3f4cba4cf82d crypto: stm32/crc32 - fix parsing list of devices
    e9f6ac508901 pstore/ram: Fix crash when setting number of cpus to an odd number
    93df0a2a0b3c jfs: fix uaf in jfs_evict_inode
    3f8217c323fd jfs: fix array-index-out-of-bounds in dbAdjTree
    1b9d6828589d jfs: fix slab-out-of-bounds Read in dtSearch
    fd3486a89377 UBSAN: array-index-out-of-bounds in dtSplitRoot
    98f9537fe61b FS:JFS:UBSAN:array-index-out-of-bounds in dbAdjTree
    d2049af7ddbc ACPI: extlog: fix NULL pointer dereference check
    0d2adafba97a PNP: ACPI: fix fortify warning
    b0b96859abe7 ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop
    20277842d911 audit: Send netlink ACK before setting connection in auditd_set
    27756ae36645 regulator: core: Only increment use_count when enable_count changes
    aed181fbc2e2 perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file
    980d5fe989e0 x86/mce: Mark fatal MCE's page as poison to avoid panic in the kdump kernel
    0580f4403ad3 powerpc/lib: Validate size for vector operations
    7cd81d23586e powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE
    9bf6c6f0974b powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()
    171468044b6d powerpc: Fix build error due to is_valid_bugaddr()
    f6781add1c31 powerpc/mm: Fix null-pointer dereference in pgtable_cache_add
    3cdbfac1068f x86/entry/ia32: Ensure s32 is sign extended to s64
    aa8bd0d9b2c9 tick/sched: Preserve number of idle sleeps across CPU hotplug events
    200d17b226a1 mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan
    b2b0d40775cc spi: bcm-qspi: fix SFDP BFPT read by usig mspi read
    344e8f33927a gpio: eic-sprd: Clear interrupt after set the interrupt type
    f81d67832cf5 drm/exynos: gsc: minor fix for loop iteration in gsc_runtime_resume
    83d86b4a77d0 drm/exynos: fix accidental on-stack copy of exynos_drm_plane
    3e835d6e6564 drm/bridge: nxp-ptn3460: simplify some error checking
    021e214947d5 drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking
    9dd334a82450 drm: Don't unref the same fb many times by mistake due to deadlock handling
    5624d628a1e4 gpiolib: acpi: Ignore touchpad wakeup on GPD G1619-04
    4e66422f1b56 netfilter: nf_tables: reject QUEUE/DROP verdict parameters
    bd517df3bdad rbd: don't move requests to the running list on errors
    69a087625203 btrfs: defrag: reject unknown flags of btrfs_ioctl_defrag_range_args
    d0bf04c9654c btrfs: don't warn if discard range is not aligned to sector
    927d1a3d3278 btrfs: tree-checker: fix inline ref size in error messages
    5c9e576bfda9 btrfs: ref-verify: free ref cache before clearing mount opt
    d3d6162eb1e5 net: fec: fix the unhandled context fault from smmu
    3422bfda9203 fjes: fix memleaks in fjes_hw_setup
    07bcc3cd3d91 netfilter: nf_tables: validate NFPROTO_* family
    b55e492f06f5 netfilter: nf_tables: restrict anonymous set and map names to 16 bytes
    2501afe6c4c9 net/mlx5e: fix a double-free in arfs_create_groups
    bca555e8a240 net/mlx5: Use kfree(ft->g) in arfs_create_groups()
    0917d771f6e5 net/mlx5: DR, Use the right GVMI number for drop action
    4f4dc7098bdf netlink: fix potential sleeping issue in mqueue_flush_file
    da70948068bc tcp: Add memory barrier to tcp_push()
    01d15b68f041 afs: Hide silly-rename files from userspace
    dad9b28f675e tracing: Ensure visibility when inserting an element into tracing_map
    a37ae111db5e net/rds: Fix UBSAN: array-index-out-of-bounds in rds_cmsg_recv
    b8e8838f82f3 llc: Drop support for ETH_P_TR_802_2.
    b643d0defcba llc: make llc_ui_sendmsg() more robust against bonding changes
    06f30fdbc4cf vlan: skip nested type that is not IFLA_VLAN_QOS_MAPPING
    1fea9969b81c net/smc: fix illegal rmb_desc access in SMC-D connection dump
    5c6183f3c748 x86/CPU/AMD: Fix disabling XSAVES on AMD family 0x17 due to erratum
    7e180b702aab powerpc: Use always instead of always-y in for crtsavres.o
    457ef4fe541c fs: move S_ISGID stripping into the vfs_*() helpers
    0cb0093fd6a2 fs: add mode_strip_sgid() helper
    635a0039e87e mtd: spinand: macronix: Fix MX35LFxGE4AD page size
    3f4e660144ed block: Remove special-casing of compound pages
    0785e298996c rename(): fix the locking of subdirectories
    f0824ca28317 ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path
    a1e80a33bf75 nouveau/vmm: don't set addr on the fail path to avoid warning
    f49f9e802785 mmc: core: Use mrq.sbc in close-ended ffu
    e15b1553d032 arm64: dts: qcom: sdm845: fix USB wakeup interrupt types
    830c99794b44 parisc/firmware: Fix F-extend for PDC addresses
    dd50fe18c234 rpmsg: virtio: Free driver_override when rpmsg_remove()
    5030d4c79886 hwrng: core - Fix page fault dead lock on mmap-ed hwrng
    5bc17b4fc2aa PM: hibernate: Enforce ordering during image compression/decompression
    cf6889bb8b56 crypto: api - Disallow identical driver names
    a7edaf40fcca ext4: allow for the last group to be marked as trimmed
    e2ecfd556542 serial: sc16is7xx: add check for unsupported SPI modes during probe
    120b65f80b8f spi: introduce SPI_MODE_X_MASK macro
    2b708e6b28f8 serial: sc16is7xx: set safe default SPI clock frequency
    e53321b341ab units: add the HZ macros
    34d74cf3c799 units: change from 'L' to 'UL'
    7478445a4547 units: Add Watt units
    b6179745482e include/linux/units.h: add helpers for kelvin to/from Celsius conversion
    2ed05a8cc9b0 PCI: mediatek: Clear interrupt status before dispatching handler
    dbf9e2bf8e76 Revert "rt: drop -stable migrate_disable"
    d7ed2aabdf71 rt: drop -stable migrate_disable
    9ae0a737b97c NFS: fix general protection fault in nfs_mount
    dafbace6032e x86/alternatives: Acquire pte lock with interrupts enabled
    31708c13e464 x86/entry: Emit a symbol for register restoring thunk
    9ad5defd9059 clear_warn_once: add a clear_warn_once= boot parameter
    fbda05a6df01 clear_warn_once: bind a timer to written reset value
    2365198f516a clear_warn_once: expand debugfs to include read support
    356914747645 perf: Alias SYS_futex with SYS_futex_time64 on 32-bit arches with 64bit time_t
    178189d65780 kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE
    706efec4c1e2 perf cs-etm: Move definition of 'traceid_list' global variable from header file
    48ab6faa417e defconfigs: drop obselete options
    1fe4ee7f680c libtraceevent: Fix build with binutils 2.35
    953da1f7e728 arm64: dts: ti: k3-am65-main: add sd wp-invert into k3-am65 dtb
    8c083fb78a3f Fix compiling warnings of file arm64/kernel/perf_callchain.c
    85f0a97f3aac eventfd: Enlarge recursion limit to allow vhost to work
    4a6bacba3689 perf: Fix the warning of perf_regs.c
    4b69a5a32098 perf: perf can not parser the backtrace of app in the 32bit system and 64bit kernel.
    c5dcdef27c57 arm64/perf: fix backtrace for AAPCS with FP enabled
    05f4afe8b669 Revert "uptime: allow the optional limiting of kernel runtime"
    157af3a61d56 tools/power turbostat: Support Tiger Lake
    008b46517c94 arm64: dts: ti: k3-am65-mcu:Update the power domain cells
    b658676c81a0 fixup! yaffs: Fix build warning by handling inode i_version with proper atomic API
    03142acba06e ARM: 8918/2: only build return_address() if needed
    9065d188f874 KVM: LAPIC: Mark hrtimer for period or oneshot mode to expire in hard interrupt context
    4cd12df48b83 selftest/bpf: Use CHECK macro instead of RET_IF
    84591c1cb409 Revert "selftests/bpf: Fix perf_buffer test on systems w/ offline CPUs"
    844b959f96bd Revert "selftests/bpf: Skip perf hw events test if the setup disabled it"
    45760a7e1301 Revert "platform/x86: wmi: Destroy on cleanup rather than unregister"
    e64f1a1d9447 yaffs2: fix memory leak when /proc/yaffs is read
    896b38b46db9 x86/mce: Add compat_ioctl assignment to make it compatible with 32-bit system
    06356153574a cpufreq: Fix policy initialization for internal governor drivers
    eb30339a5892 arm64: dts: k3-am6: Add FSS and OSPI nodes
    f03b2ab37a42 arm64: dts: ti: k3-am654-base-board: Add OSPI entry
    762a03109411 arm64: dts: ti: k3-am65-main: Enable support for sdhci1
    d8075838fe56 arm64: dts: ti: k3-am654-base-board: Add Support for SD card
    fc2d760470d1 arm64: dts: r8a7795-h3ulcb: Add reserved memory regions
    baab8b4b5235 arm64: dts: r8a7795: Add CPUIdle support for all CPU core
    f11171f18a03 pci: pcie-rcar: add regulators support
    638d6d5f6dd3 driver: net: can: disable clock when it is in enable status
    e5a7b62d0517 arch: arm64: dts: Set gpio5-pin9 as input by default
    f4d7dbafb103 perf: Make perf able to build with latest libbfd
    239eea7ef5dd mips: vdso: fix 'jalr $t9' crash in vdso code
    f7fe06ec7a59 linux-yocto linux-yocto-dev: Fix /bin/awk issues
    ced1c6effc4f yaffs: add strict check when call yaffs_internal_read_super
    9daa7e790501 yaffs: repair yaffs_get_mtd_device
    1fffb37acca0 yaffs: Fix build failure by handling inode i_version with proper atomic API
    0007c563276d yaffs2: fix memory leak in mount/umount
    e68cc08a6841 yaffs: Avoid setting any ACL releated xattr
    bcf077d933b8 Yaffs:check oob size before auto selecting Yaffs1
    19df313c0952 fs: yaffs2: replace CURRENT_TIME by other appropriate apis
    c769a7da8c69 yaffs2: adjust to proper location of MS_RDONLY
    0f1751fff1a7 mips: Kconfig: add QEMUMIPS64 option
    86f59bbc023c aufs5: core
    d1e47364cab1 aufs5: standalone
    74a8e4bf3f2b aufs5: mmap
    7e05613a5d85 aufs5: base
    aa75a790b542 aufs5: kbuild
    8c6f9b2baa40 yaffs2: import git revision b4ce1bb (jan, 2020)
    0381cd8f4359 perf: x86-32: explicitly include <errno.h>
    ad78324feafb perf: mips64: Convert __u64 to unsigned long long
    34cefcf34034 perf: fix bench numa compilation
    fdad3e366e6e perf annotate: replace 'expand' with equivalent sed expression
    a771eec901c6 perf: add SLANG_INC for slang.h
    e0614357c8a3 perf: add sgidefs.h to for mips builds
    ac92fa579b2b perf: change --root to --prefix for python install
    6388df0def8f perf: add 'libperl not found' warning
    a0fb87034f0f perf: force include of <stdbool.h>
    32f3ab82932c uptime: allow the optional limiting of kernel runtime
    9486b2eba979 fat: don't use obsolete random32 call in namei_vfat
    5a3398afe097 FAT: Added FAT_NO_83NAME
    079c6f61933c FAT: Add CONFIG_VFAT_NO_CREATE_WITH_LONGNAMES option
    2431b8dd05f7 FAT: Add CONFIG_VFAT_FS_NO_DUALNAMES option
    5338ecdddce2 initramfs: allow an optional wrapper script around initramfs generation
    6c31503ceca3 x86/boot/compressed/64: Define __force_order only when CONFIG_RANDOMIZE_BASE is unset
    3d683756dce2 modpost: srcversion sometimes incorrect
    89931013d209 linux-yocto: Handle /bin/awk issues
    75fa99f9e576 uvesafb: provide option to specify timeout for task completion
    bf98aa12f36b uvesafb: print error message when task timeout occurs
    1938b8143850 compiler.h: Undef before redefining __attribute_const__
    752c3dd6b4b6 vmware: include jiffies.h
    b23cbd0f7b66 Resolve jiffies wrapping about arp
    1830d18ce4d7 nfs: Allow default io size to be configured.
    2a7b6aaaa59c check console device file on fs when booting
    72808adae4fe mount_root: clarify error messages for when no rootfs found
    6b31420bcb71 NFS: allow nfs root mount to use alternate rpc ports
    d078e29aa31a menuconfig,mconf-cfg: Allow specification of ncurses location
    26e26affd3ae modpost: mask trivial warnings
    71e89f4b4d59 kbuild: exclude meta directory from distclean processing
    478d180563a8 powerpc: serialize image targets
    ae15d16d2f89 arm: serialize build targets
    e4ce2ac7cb8f arch/x86/boot: use prefix map to avoid embedded paths
    0c64b73184d9 crtsavres: fixups for 5.4+
    043ffbbcdb8f powerpc/ptrace: Disable array-bounds warning with gcc8
    f45a7cd151d0 powerpc: Disable attribute-alias warnings from gcc8
    d58c4db9597a powerpc: add crtsavres.o to archprepare for kbuild
    fc4ace07b7d2 powerpc: kexec fix for powerpc64
    403ce2291e1b powerpc: Add unwind information for SPE registers of E500 core
    6fb1edc69050 staging: octeon: Add a workaround for the issue of GCC8
    88e319c5c225 4kc cache tlb hazard: tlbp cache coherency
    f946365e8139 malta uhci quirks: make allowance for slow 4k(e)c
    2281cb8cc437 arm/Makefile: Fix systemtap
    7942a16ee46c vexpress: Pass LOADADDR to Makefile
    9c74389f3c8a arm: ARM EABI socketcall
    65b684cc2da1 ARM: LPAE: Invalidate the TLB for module addresses during translation fault

(From OE-Core rev: dd36d66e23cb0f9d182b25f564f355202b71c7e7)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:47 -07:00
Hugo SIMELIERE
b6f7111caf shadow: fix CVE-2023-4641
Upstream-Status: Backport [65c88a43a2]

(From OE-Core rev: d1f74ec0419dd13a23549cfdc228b91602bfb065)

Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:47 -07:00
Ashish Sharma
b027cb1af8 xserver-xorg: Backport fix for CVE-2024-31080
Upstream-Status: Backport [96798fc196]
(From OE-Core rev: f950b5a09c6dd19bdd5a942ae34516338e723942)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:47 -07:00
Ashish Sharma
42694d5ea2 xserver-xorg: Backport fix for CVE-2024-31081
Upstream-Status: Backport [3e77295f88]
(From OE-Core rev: bfda6a90f99f3051172e28c4a6c049d745ed5cb8)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:47 -07:00
Ashish Sharma
2e04c8f59a go: Backport fix for CVE-2024-24784
Upstream-Status: Backport [5330cd225b]
(From OE-Core rev: b58dae3401bcf6747a36e87106285d4bc944d25d)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:47 -07:00
Vijay Anusuri
601f38e5cd ncurses: Backport fix for CVE-2023-50495
Upstream-Status: Backport from efe9674ee1

Reference: https://invisible-island.net/archives/ncurses/6.4/ncurses-6.4-20230424.patch.gz

(From OE-Core rev: 530314b699a7ad53e6dcd96658873cef7014e483)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-13 04:51:47 -07:00
Steve Sakoman
50320bfdc8 perf: bump PR to deal with sstate corruption on autobuilder
Testing of an SPDX patch corrupted sstate, so bump PR to work around the issue

(From OE-Core rev: 47ce772102b45db14dc21112367534ea1c37e33c)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-05 06:34:42 -07:00
Steve Sakoman
7dafe710db tar: bump PR to deal with sstate corruption on autobuilder
Testing of an SPDX patch corrupted sstate, so bump PR to work around the issue

(From OE-Core rev: cbce426763592e82e6e0ed20f18cedfa4d01f61e)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-05 06:34:42 -07:00
virendra thakur
f010cd7f24 openssl: Fix CVE-2024-0727
PKCS12 structures contain PKCS7 ContentInfo fields. These fields are
optional and can be NULL even if the "type" is a valid value. OpenSSL
was not properly accounting for this and a NULL dereference can occur
causing a crash.

(From OE-Core rev: 18eb56925878a67ca1d7ce3eb9092f611023bc23)

Signed-off-by: virendra thakur <virendrak@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-05 06:34:42 -07:00
Vijay Anusuri
dbb4e8a5cc curl: backport Debian patch for CVE-2024-2398
import patch from ubuntu to fix
 CVE-2024-2398

Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/curl/tree/debian/patches/?h=ubuntu%2Ffocal-security
Upstream commit
deca803999]

(From OE-Core rev: ce65f86c55ecf2c0e52564488e0237ba24429c45)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-05 06:34:42 -07:00
Vijay Anusuri
ea68e06fa2 tar: Fix for CVE-2023-39804
Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/tar.git/commit/?id=a339f05cd269013fa133d2f148d73f6f7d4247e4

(From OE-Core rev: 082c31db387957963952c485a436dc38a64498d0)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-05 06:34:42 -07:00
Vijay Anusuri
869db167b1 go: Fix for CVE-2023-45289 CVE-2023-45290 & CVE-2024-24785
Upstream-Status: Backport
[20586c0dbe
&
bf80213b12
&
3643147a29]

(From OE-Core rev: 2bc50dccff15b9c4ad815092ef20caa3ef06864c)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-05 06:34:42 -07:00
Vijay Anusuri
e555aefeef libtiff: backport Debian patch for CVE-2023-6277 & CVE-2023-52356
import patches from ubuntu to fix
 CVE-2023-6277
 CVE-2023-52356

Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/tiff/tree/debian/patches/?h=ubuntu%2Ffocal-security
Upstream commit
5320c9d89c
&
0b02532471
&
de7bfd7d43
&
dbb825a831
&
51558511bd]

(From OE-Core rev: 15abae1f6a9861e28ce35b015cb3ddc434f9fca4)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-04-05 06:34:42 -07:00
Michael Halstead
1c2fbec01f yocto-uninative: Update to 4.4 for glibc 2.39
(From OE-Core rev: d0811b98fa3847dbbfcfe6a80694509bb29aaf9c)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 56fdd8b79e2f7ec30d2cdcfa0c399a6553efac1e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:33 -10:00
Alexander Kanavin
ad88f632b4 linux-firmware: upgrade 20231211 -> 20240220
License-Update: additional files

(From OE-Core rev: c6e4ac2acf35fb2e477799e6faa1cc30feda44c3)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit add81ef0299ea5260f9bdc59ffc8f5cc0e74276f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:33 -10:00
Alexander Sverdlin
21a90afc6b linux-firmware: upgrade 20231030 -> 20231211
(From OE-Core rev: 894cfb61103e09b6bf0467a6b96765e774ca985b)

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0caafdbbf4e7dc84b919afe14f7cb8c46a9e4ac2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:33 -10:00
Alex Kiernan
a3e4d31c0c wireless-regdb: Upgrade 2023.09.01 -> 2024.01.23
Upstream maintainer has changed to Chen-Yu Tsai <wens@kernel.org>:

https://lore.kernel.org/all/CAGb2v657baNMPKU3QADijx7hZa=GUcSv2LEDdn6N=QQaFX8r-g@mail.gmail.com/

Note that fb768d3b13ff ("wifi: cfg80211: Add my certificate") and
3c2a8ebe3fe6 ("wifi: cfg80211: fix certs build to not depend on file
order") are required if you are using kernel signature verification.

(From OE-Core rev: 2f178a685137887f58271b84597409b6e0c395c6)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit abf169fbbf8bab13224adf4c8bfa2e26607f360c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:33 -10:00
Wang Mingyu
8226652389 wireless-regdb: upgrade 2023.05.03 -> 2023.09.01
Changelog:
==========
wireless-regdb: update regulatory database based on preceding changes
wireless-regdb: Update regulatory rules for Australia (AU) for June 2023
wireless-regdb: Update regulatory info for Türkiye (TR)
wireless-regdb: Update regulatory rules for Egypt (EG) from March 2022 guidel...
wireless-regdb: Update regulatory rules for Philippines (PH)

(From OE-Core rev: 947433332468a9662cedacada1e5d19d9a664ac2)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2f5edb6904bf16a9c52a9b124aeb5297487cd716)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:33 -10:00
Yoann Congal
e2ed3bde51 cve-update-nvd2-native: Remove rejected CVE from database
When a CVE is updated to be rejected, matching database entries must be
removed. Otherwise:
* an incremental update is not equivalent the to an initial download.
* rejected CVEs might still appear as Unpatched in cve-check.

(From OE-Core rev: 4eb0074be76c9bd3d6d25cae4f1b9f398ff89bf5)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f276a980b8930b98e6c8f0e1a865d77dfcfe5085)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:33 -10:00
Yoann Congal
8031922706 cve-update-nvd2-native: Fix CVE configuration update
When a CVE is created, it often has no precise version information and
this is stored as "-" (matching any version). After an update, version
information is added. The previous "-" must be removed, otherwise, the
CVE is still "Unpatched" for cve-check.

(From OE-Core rev: 80946fbe8c95169b871d816f2b71ee001a2a3d75)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 641ae3f36e09af9932dc33043a0a5fbfce62122e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:33 -10:00
Yoann Congal
ecc91377c2 cve-update-nvd2-native: nvd_request_next: Improve comment
Add a URL to the doc of the API used in the function.
... and fix a small typo dabase -> database

(From OE-Core rev: 9ba959475d84b2e87e14ceba11787b10afca45ba)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e0157b3b81333a24abd31dbb23a6abebca3e7ba7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:32 -10:00
Yoann Congal
7c67bd3dbe cve-update-nvd2-native: Remove duplicated CVE_CHECK_DB_FILE definition
CVE_CHECK_DB_FILE is already defined in cve-check.bbclass which is
always inherited in cve-update-nvd2-native (There is a check line 40).

Remove it to avoid confusion. Otherwise, this should not change
anything.

(From OE-Core rev: 4268128167386298c8a7777ce3d3b5e7517bb366)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e5f3f223885c17b7007c310273fc7c80b90a4105)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:32 -10:00
Yoann Congal
53afd9dc5b cve-update-nvd2-native: Add an age threshold for incremental update
Add a new variable "CVE_DB_INCR_UPDATE_AGE_THRES", which can be used to
specify the maximum age of the database for doing an incremental update
For older databases, a full re-download is done.

With a value of "0", this forces a full-redownload.

(From OE-Core rev: c9a3e5a4ca297249f8fd7380a824dce0c407280b)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 74c1765111b6610348eae4b7e41d7045ce58ef86)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:32 -10:00
Yoann Congal
17634daabd cve-update-nvd2-native: Fix typo in comment
attmepts -> attempts

(From OE-Core rev: 3ce55e2a1e680de1cd9be735fb766a1366e88a98)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit dc18aaeda8e810f9082a0ceac08e5e4275bbd0f7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:32 -10:00
Vijay Anusuri
8b77dd2bcf libxml2: Backport fix for CVE-2024-25062
Upstream-Status: Backport
[31c6ce3b63
&
2b0aac140d]

(From OE-Core rev: e4e621dc42be5dd158393fcadf5200f9eae613cb)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-25 04:02:32 -10:00
Steve Sakoman
54d8a1f631 build-appliance-image: Update to dunfell head revision
(From OE-Core rev: b49b0a3dd74c24f3a011c9c0b5cf8f6530956cfa)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-01 03:22:39 -10:00
Steve Sakoman
593cbdf6c3 poky.conf: bump version for 3.1.32
(From meta-yocto rev: 35a5299b48fdd8ea03826c7350a547ea8e836428)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-01 03:19:04 -10:00
Steve Sakoman
4fd12fa20e documentation: update for 3.1.32
(From yocto-docs rev: 4866e63156b4493bbe8054ac41c3cbad9d2257ec)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-01 03:19:04 -10:00
Michael Opdenacker
b000e8b274 ref-manual: release-process: grammar fix
(From yocto-docs rev: 9c15a33c35ccebf088befce411108cabf7ba3159)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-01 03:19:04 -10:00
Vijay Anusuri
5fc659fd02 less: Fix for CVE-2022-48624
Upstream-Status: Backport [c6ac6de496]

(From OE-Core rev: e088a7e59532ede45549e6120be43531fa77855a)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-01 03:19:04 -10:00
Priyal Doshi
dee3046d2b tzdata: Upgrade to 2024a
(From OE-Core rev: 8265efa6a2009e06094698532f3fb398cbab6415)

Signed-off-by: Priyal Doshi <pdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-03-01 03:19:04 -10:00
Richard Purdie
6289654c30 sstatesig: Allow exclusion of the root directory for do_package
The package task references WORKDIR at it's top level and we can't
easily make the timestamp for that determnistic due to writes to files
there and in other subdirs. We could try and force it to a specific value
but it is easier to just remove it from the package task, we don't need
it there or care about it in this case.

(From OE-Core rev: 90694a6299c94dddab6873191f1e3123c6c4377b)

Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
(cherry picked from commit 9cceeb906527f90d8dd3aad75aa3a8805e2a1df5)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:55 -10:00
Steve Sakoman
9ba6ff6278 cve-exclusion_5.4.inc: update for 5.4.268
(From OE-Core rev: 7360603c50ca61ec9d6a49798ec6b67a80e93c69)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:55 -10:00
Bruce Ashfield
34ae492934 linux-yocto/5.4: update to v5.4.268
Updating linux-yocto/5.4 to the latest korg -stable release that comprises
the following commits:

    f0602893f43a Linux 5.4.268
    5ff9836ab0f6 arm64: dts: armada-3720-turris-mox: set irq type for RTC
    300a55a3a6d4 perf top: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set
    ea5587946a15 i2c: s3c24xx: fix transferring more than one message in polling mode
    90734f1cdee8 i2c: s3c24xx: fix read transfers in polling mode
    05b6d0234a37 mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure
    d5661f46c11d kdb: Fix a potential buffer overflow in kdb_local()
    cf6260a34d28 kdb: Censor attempts to set PROMPT without ENABLE_MEM_READ
    36b6db699c03 ipvs: avoid stat macros calls from preemptible context
    4c8a827d68ba netfilter: nf_tables: skip dead set elements in netlink dump
    db9fda526c8d net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe
    8efe3e8a6c4c net: ravb: Fix dma_addr_t truncation in error case
    f7a153e3ac41 net: phy: micrel: populate .soft_reset for KSZ9131
    02467ab8b404 net: qualcomm: rmnet: fix global oob in rmnet_policy
    5b58cfcd4ce1 s390/pci: fix max size calculation in zpci_memcpy_toio()
    14a7e3a0d099 PCI: keystone: Fix race condition when initializing PHYs
    40d171ef2389 nvmet-tcp: Fix the H2C expected PDU len calculation
    258dccd67ba0 serial: imx: Correct clock error message in function probe()
    1d8e62b5569c apparmor: avoid crash when parsed profile name is empty
    4cd5db4fc46c perf env: Avoid recursively taking env->bpf_progs.lock
    f19a1cb1f9f4 perf bpf: Decouple creating the evlist from adding the SB event
    739b800279d0 perf top: Move sb_evlist to 'struct perf_top'
    2d59b6ed998d perf record: Move sb_evlist to 'struct record'
    14a9769a769e perf env: Add perf_env__numa_node()
    9638beb4e10a nvmet-tcp: fix a crash in nvmet_req_complete()
    ee5e7632e981 nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length
    887ab0a444f0 perf genelf: Set ELF program header addresses properly
    ed903eeb4e2e software node: Let args be NULL in software_node_get_reference_args
    dbb71ba53146 acpi: property: Let args be NULL in __acpi_node_get_property_reference
    b502fb43f7fb serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed
    d8003fdcc66c MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup()
    93a7b8d4338b MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()
    fa873e90301c mips: Fix incorrect max_low_pfn adjustment
    b419fe1180f7 HID: wacom: Correct behavior when processing some confidence == false touches
    f7a92bec8eea x86/kvm: Do not try to disable kvmclock if it was not enabled
    1d6d95aaa692 wifi: mwifiex: configure BSSID consistently when starting AP
    249b78dbb154 wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors
    c22b4f159b27 wifi: rtlwifi: Remove bogus and dangerous ASPM disable/enable code
    b33a30358826 rootfs: Fix support for rootfstype= when root= is given
    02bd78673b65 fbdev: flush deferred work in fb_deferred_io_fsync()
    7cfc97d1ec3f ALSA: oxygen: Fix right channel of capture volume mixer
    85f6a6590dcf usb: mon: Fix atomicity violation in mon_bin_vma_fault
    14e60d584a42 usb: typec: class: fix typec_altmode_put_partner to put plugs
    94f2aa8145f4 Revert "usb: typec: class: fix typec_altmode_put_partner to put plugs"
    a05ebd577979 usb: chipidea: wait controller resume finished for wakeup irq
    d9c8275c5960 Revert "usb: dwc3: don't reset device side if dwc3 was configured as host-only"
    548a00780d34 Revert "usb: dwc3: Soft reset phy on probe for host"
    c145217af8bf usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart
    5d5d9827016a usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
    29032c8e3e31 tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug
    5c3d4930c7b7 binder: fix unused alloc->free_async_space
    252a2a5569eb binder: fix race between mmput() and do_exit()
    4404c2b832cf xen-netback: don't produce zero-size SKB frags
    ee4e9c5ffff9 Revert "ASoC: atmel: Remove system clock tree configuration for at91sam9g20ek"
    01fe1b7bb0aa Input: atkbd - use ab83 as id when skipping the getid command
    a53e15e592b4 binder: fix use-after-free in shinker's callback
    fc1119a3c65d binder: fix async space check for 0-sized buffers
    1b7c039260ce of: unittest: Fix of_count_phandle_with_args() expected value message
    a0a061151a62 of: Fix double free in of_parse_phandle_with_args_map
    a9de8a4f52ff mmc: sdhci_omap: Fix TI SoC dependencies
    b8bbe3354419 clk: si5341: fix an error code problem in si5341_output_clk_set_rate
    4810cce02967 watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling
    11a64041d921 watchdog/hpwdt: Only claim UNKNOWN NMI if from iLO
    0d5685c13d55 watchdog: set cdev owner before adding
    777aa44f63fa drivers: clk: zynqmp: calculate closest mux rate
    5a572eb32fd3 gpu/drm/radeon: fix two memleaks in radeon_vm_init
    8b55b06e737f drivers/amd/pm: fix a use-after-free in kv_parse_power_table
    06d95c99d5a4 drm/amd/pm: fix a double-free in si_dpm_init
    8ee1fb4c5168 drm/amdgpu/debugfs: fix error code when smc register accessors are NULL
    68ec0a0211c4 media: dvbdev: drop refcount on error path in dvb_device_open()
    06a9263ac925 media: cx231xx: fix a memleak in cx231xx_init_isoc
    6a421928f7b2 drm/bridge: tc358767: Fix return value on error case
    d46fe2e93e53 drm/radeon/trinity_dpm: fix a memleak in trinity_parse_power_table
    c0769f091ff9 drm/radeon/dpm: fix a memleak in sumo_parse_power_table
    5d12c5d75f7c drm/radeon: check the alloc_workqueue return value in radeon_crtc_init()
    09d59f73f46a drm/drv: propagate errors from drm_modeset_register_all()
    31b169a8bed7 drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks
    9170aa07cb20 drm/msm/mdp4: flush vblank event on disable
    136f919816cc ASoC: cs35l34: Fix GPIO name and drop legacy include
    86af5d7acf4c ASoC: cs35l33: Fix GPIO name and drop legacy include
    94aa82723abb drm/radeon: check return value of radeon_ring_lock()
    bf48d891234b drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check()
    8e5bcb781f87 drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()
    5624a3c1b1eb f2fs: fix to avoid dirent corruption
    b083ec00f39e drm/bridge: Fix typo in post_disable() description
    47aa8fcd5e8b media: pvrusb2: fix use after free on context disconnection
    f6a35c21cde3 RDMA/usnic: Silence uninitialized symbol smatch warnings
    9bb977521768 ARM: davinci: always select CONFIG_CPU_ARM926T
    3f15ba3dc14e ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim()
    dcc9cd5ddb94 Bluetooth: btmtkuart: fix recv_buf() return value
    efcfcd5f2b5e Bluetooth: Fix bogus check for re-auth no supported with non-ssp
    598c902649ea netfilter: nf_tables: mark newset as dead on transaction abort
    8dbaaf71ffc2 wifi: rtlwifi: rtl8192se: using calculate_bit_shift()
    8fa54f7532c8 wifi: rtlwifi: rtl8192ee: using calculate_bit_shift()
    4838d1666660 wifi: rtlwifi: rtl8192de: using calculate_bit_shift()
    e15fcb194542 rtlwifi: rtl8192de: make arrays static const, makes object smaller
    ae1df4cc0adb wifi: rtlwifi: rtl8192ce: using calculate_bit_shift()
    a3a25b5d019c wifi: rtlwifi: rtl8192cu: using calculate_bit_shift()
    6f84a338ed61 wifi: rtlwifi: rtl8192c: using calculate_bit_shift()
    ee0a81cf7e7b wifi: rtlwifi: rtl8188ee: phy: using calculate_bit_shift()
    7cbcf5fe01d0 wifi: rtlwifi: add calculate_bit_shift()
    4985e507e0b9 dma-mapping: clear dev->dma_mem to NULL after freeing it
    48614d528b42 virtio/vsock: fix logic which reduces credit update messages
    332cd73a9298 selftests/net: fix grep checking for fib_nexthop_multiprefix
    12b91f36369b scsi: hisi_sas: Replace with standard error code return value
    14470da02dfc arm64: dts: qcom: sdm845-db845c: correct LED panic indicator
    c23c4984ce0b scsi: fnic: Return error if vmalloc() failed
    16d21bfcb371 wifi: rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior
    4a20fa7322e2 rtlwifi: Use ffs in <foo>_phy_calculate_bit_shift
    0226926ba326 firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()
    ef75f3c56bf3 net/ncsi: Fix netlink major/minor version numbers
    7276fac0a668 ncsi: internal.h: Fix a spello
    f6154d498365 ARM: dts: qcom: apq8064: correct XOADC register address
    bd1bf5e8056a wifi: libertas: stop selecting wext
    dc843ed97ddb bpf, lpm: Fix check prefixlen before walking trie
    93c71706a1f0 wifi: rtw88: fix RX filter in FIF_ALLMULTI flag
    aebe7e47c201 NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT
    db55dbbba5e5 blocklayoutdriver: Fix reference leak of pnfs_device_node
    e0e3f4a18784 crypto: scomp - fix req->dst buffer overflow
    77d2b1833631 crypto: sahara - do not resize req->src when doing hash operations
    53ba86f765d4 crypto: sahara - fix processing hash requests with req->nbytes < sg->length
    ba1ef4276e10 crypto: sahara - improve error handling in sahara_sha_process()
    0274697075e1 crypto: sahara - fix wait_for_completion_timeout() error handling
    b588ed190b9a crypto: sahara - fix ahash reqsize
    aea92cca4375 crypto: virtio - Wait for tasklet to complete on device remove
    efc8ef87ab91 gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump
    d1fe1aede684 pstore: ram_core: fix possible overflow in persistent_ram_init_ecc()
    6e907574ef9b crypto: sahara - fix error handling in sahara_hw_descriptor_create()
    e82d07d5c709 crypto: sahara - fix processing requests with cryptlen < sg->length
    da43c26203d9 crypto: sahara - fix ahash selftest failure
    beb815a0001e crypto: sahara - remove FLAGS_NEW_KEY logic
    4c10928e31c7 crypto: af_alg - Disallow multiple in-flight AIO requests
    ca3484d5cadc crypto: ccp - fix memleak in ccp_init_dm_workarea
    9fffae6cc42b virtio_crypto: Introduce VIRTIO_CRYPTO_NOSPC
    01081d76cc3e crypto: virtio - don't use 'default m'
    830a4f073f7e crypto: virtio - Handle dataq logic with tasklet
    86a7c9ba839e selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket
    1bf4fe14e97c mtd: Fix gluebi NULL pointer dereference caused by ftl notifier
    6b84cb9e383d spi: sh-msiof: Enforce fixed DTDL for R-Car H3
    36e19f84634a calipso: fix memory leak in netlbl_calipso_add_pass()
    0396c1e211bb netlabel: remove unused parameter in netlbl_netlink_auditinfo()
    7b99eafea070 net: netlabel: Fix kerneldoc warnings
    6c38e791bde0 ACPI: LPIT: Avoid u32 multiplication overflow
    1e3a2b9b4039 ACPI: video: check for error while searching for backlight device parent
    f5ea2cf3bbb1 mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response
    1e80aa25d186 powerpc/imc-pmu: Add a null pointer check in update_events_in_group()
    9da4a56dd377 powerpc/powernv: Add a null pointer check in opal_powercap_init()
    e93d7cf4c1dd powerpc/powernv: Add a null pointer check in opal_event_init()
    f84c1446daa5 powerpc/powernv: Add a null pointer check to scom_debug_init_one()
    b0200560b69e selftests/powerpc: Fix error handling in FPU/VMX preemption tests
    9b5f03500bc5 powerpc/pseries/memhp: Fix access beyond end of drmem array
    69c0b92f78a2 powerpc/pseries/memhotplug: Quieten some DLPAR operations
    5401b689ad44 powerpc/44x: select I2C for CURRITUCK
    245da9eebba0 powerpc: add crtsavres.o to always-y instead of extra-y
    5da3b6e7196f EDAC/thunderx: Fix possible out-of-bounds string access
    555a2f09a69d x86/lib: Fix overflow when counting digits
    6ee48d71021e coresight: etm4x: Fix width of CCITMIN field
    b00d5f7152ab parport: parport_serial: Add Brainboxes device IDs and geometry
    760a5ab4d880 parport: parport_serial: Add Brainboxes BAR details
    e93da893d52d uio: Fix use-after-free in uio_open
    da488e1aad20 binder: fix comment on binder_alloc_new_buf() return value
    a92b2797ca72 binder: fix trivial typo of binder_free_buf_locked()
    9774dabad707 binder: use EPOLLERR from eventpoll.h
    5e1eb0dfc95b ACPI: resource: Add another DMI match for the TongFang GMxXGxx
    c5b051750011 drm/crtc: fix uninitialized variable use
    cfc6afe930c6 ARM: sun9i: smp: fix return code check of of_property_match_string
    ef7152f8705f ida: Fix crash in ida_free when the bitmap is empty
    c97996451f94 Input: xpad - add Razer Wolverine V2 support
    510a7bc3682d ARC: fix spare error
    0fe6431622b7 s390/scm: fix virtual vs physical address confusion
    8fb5795bcf81 Input: i8042 - add nomux quirk for Acer P459-G2-M
    2c70bf99783b Input: atkbd - skip ATKBD_CMD_GETID in translated mode
    3d9a9c0881f4 reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
    4f7512e779ae ring-buffer: Do not record in NMI if the arch does not support cmpxchg in NMI
    e405c22ee576 tracing: Add size check when printing trace_marker output
    f787481af4a8 tracing: Have large events show up as '[LINE TOO BIG]' instead of nothing
    d4408ffeb848 neighbour: Don't let neigh_forced_gc() disable preemption for long
    9cc9683aec42 drm/crtc: Fix uninit-value bug in drm_mode_setcrtc
    2f601e869611 jbd2: correct the printing of write_flags in jbd2_write_superblock()
    1c187cb210c1 clk: rockchip: rk3128: Fix HCLK_OTG gate register
    3f50a73fd929 drm/exynos: fix a wrong error checking
    8bc21ac17da8 drm/exynos: fix a potential error pointer dereference
    6eb975932853 nvme: introduce helper function to get ctrl state
    971c0b10c94d ASoC: da7219: Support low DC impedance headset
    ec76b9e057de net/tg3: fix race condition in tg3_reset_task()
    ef9fefca3fec nouveau/tu102: flush all pdbs on vmm flush
    b67005b284dd ASoC: rt5650: add mutex to avoid the jack detection failure
    4fece6617b57 ASoC: cs43130: Fix incorrect frame delay configuration
    1bf33a67a944 ASoC: cs43130: Fix the position of const qualifier
    61c1e46fb84e ASoC: Intel: Skylake: mem leak in skl register function
    81610106fd5b ASoC: nau8822: Fix incorrect type in assignment and cast to restricted __be16
    ad5a06e16365 ASoC: Intel: Skylake: Fix mem leak in few functions
    57a95d06da3e ALSA: hda - Fix speaker and headset mic pin config for CHUWI CoreBook XPro
    ebc3c8e090a0 pinctrl: lochnagar: Don't build on MIPS
    12cf91e23b12 f2fs: explicitly null-terminate the xattr list

(From OE-Core rev: 4fcc89e90ed1399cdf761a0d2f7363d86fa23f23)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:55 -10:00
Bruce Ashfield
0e4ba103bb linux-yocto/5.4: update to v5.4.267
Updating linux-yocto/5.4 to the latest korg -stable release that comprises
the following commits:

    9153fc966495 Linux 5.4.267
    69ef165176a3 ASoC: meson: codec-glue: fix pcm format cast warning
    584756c3d75a ipv6: remove max_size check inline with ipv4
    66b3025202b4 ipv6: make ip6_rt_gc_expire an atomic_t
    ae424c848db6 net/dst: use a smaller percpu_counter batch for dst entries accounting
    7b3a9c2bf315 PCI: Disable ATS for specific Intel IPU E2000 devices
    c6141c49bc80 PCI: Extract ATS disabling to a helper function
    8711fa0c06d4 netfilter: nf_tables: Reject tables of unsupported family
    c67bf30baf26 net: tls, update curr on splice as well
    c2d9b438554e ath10k: Get rid of "per_ce_irq" hw param
    d15f869cb3b3 ath10k: Keep track of which interrupts fired, don't poll them
    696b992edc7e ath10k: Add interrupt summary based CE processing
    366df9ecbcb8 ath10k: Wait until copy complete is actually done before completing
    c4541e39808e mmc: sdhci-sprd: Fix eMMC init failure after hw reset
    a9c9ffcd217b mmc: core: Cancel delayed work before releasing host
    bfc3720ca8d0 mmc: rpmb: fixes pause retune on all RPMB partitions.
    77359c497305 mm: fix unmap_mapping_range high bits shift bug
    5af5e946c4dd i2c: core: Fix atomic xfer check for non-preempt config
    d8ec24d79db1 firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards
    85015a96bc24 mm/memory-failure: check the mapcount of the precise page
    3d8fab93ca98 net: Implement missing SO_TIMESTAMPING_NEW cmsg support
    f7084217d945 bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()
    acfeb9039b17 asix: Add check for usbnet_get_endpoints
    6c00721ad7aa net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues
    a4ea54c52828 net/qla3xxx: switch from 'pci_' to 'dma_' API
    863ca421b4a7 i40e: Restore VF MSI-X state during PCI reset
    01c2d73ae2dd ASoC: meson: g12a-tohdmitx: Fix event generation for S/PDIF mux
    bdc00b8c3afe ASoC: meson: g12a-tohdmitx: Validate written enum values
    fe2d1dda1db4 ASoC: meson: g12a: extract codec-to-codec utils
    93d80aadc02e i40e: fix use-after-free in i40e_aqc_add_filters()
    b40828a2ab57 net: Save and restore msg_namelen in sock_sendmsg
    68c8fdb9f9c8 net: bcmgenet: Fix FCS generation for fragmented skbuffs
    4c0fa624a693 ARM: sun9i: smp: Fix array-index-out-of-bounds read in sunxi_mc_smp_init
    c1556217ff6f net-timestamp: extend SOF_TIMESTAMPING_OPT_ID to HW timestamps
    2cdb65084824 can: raw: add support for SO_MARK
    96a6d1bb28ed can: raw: add support for SO_TXTIME/SCM_TXTIME
    b1719cbb733e net: sched: em_text: fix possible memory leak in em_text_destroy()
    ef4fd7518c6e i40e: Fix filter input checks to prevent config with invalid values
    65c6ef02ff26 nfc: llcp_core: Hold a ref to llcp_local->dev when holding a ref to llcp_local

(From OE-Core rev: a3de4e1c5b41cdbdc9942b666212aa63921399a9)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:55 -10:00
Bruce Ashfield
34a1dcf275 linux-yocto/5.4: update to v5.4.266
Updating linux-yocto/5.4 to the latest korg -stable release that comprises
the following commits:

    4410df70110f Linux 5.4.266
    7d0f1fd80ad6 block: Don't invalidate pagecache for invalid falloc modes
    a0678f504758 ring-buffer: Fix wake ups when buffer_percent is set to 100
    508e2fdd978e smb: client: fix OOB in smbCalcSize()
    644b956c946a usb: fotg210-hcd: delete an incorrect bounds test
    a56a19e44b17 x86/alternatives: Sync core before enabling interrupts
    4111986fb90e net: rfkill: gpio: set GPIO direction
    5c375a83d1f9 net: 9p: avoid freeing uninit memory in p9pdu_vreadf
    4e7f3899fb81 Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
    a83debb52310 USB: serial: option: add Quectel RM500Q R13 firmware support
    c82ba4cb44d1 USB: serial: option: add Foxconn T99W265 with new baseline
    1f87ba56c43d USB: serial: option: add Quectel EG912Y module support
    a59cb26bc188 USB: serial: ftdi_sio: update Actisense PIDs constant names
    a70b1933fa54 wifi: cfg80211: fix certs build to not depend on file order
    e8fb00205144 wifi: cfg80211: Add my certificate
    8717fd6d0c30 iio: adc: ti_am335x_adc: Fix return value check of tiadc_request_dma()
    45af72f149a8 iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
    4257c16c149d scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
    e1b31edfe7d3 Input: ipaq-micro-keys - add error handling for devm_kmemdup
    a85d6aa2b555 iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
    388c90c577d7 interconnect: Treat xlate() returning NULL node as an error
    04c22233447d btrfs: do not allow non subvolume root targets for snapshot
    3230a69e663b smb: client: fix NULL deref in asn1_ber_decoder()
    0ccb39511a7f ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB
    6bcf819198d9 ALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10
    34e6c4c6a985 pinctrl: at91-pio4: use dedicated lock class for IRQ
    624659563e26 i2c: aspeed: Handle the coalesced stop conditions with the start conditions.
    47ae5242292d afs: Fix overwriting of result of DNS query
    c04b7b28c9f0 net: check dev->gso_max_size in gso_features_check()
    761ee09e9f5d net: warn if gso_type isn't set for a GSO SKB
    eec7ef60d297 afs: Fix dynamic root lookup DNS check
    82d64cbe487c afs: Fix the dynamic root's d_delete to always delete unused dentries
    2b4600fb6967 net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
    b10265532df7 net/rose: fix races in rose_kill_by_device()
    ed4cb8a42ce9 ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
    3f82a6a6d7ee net: sched: ife: fix potential use-after-free
    f48e3337ab0b net/mlx5e: Correct snprintf truncation handling for fw_version buffer used by representors
    d07ef3a87064 net/mlx5: Fix fw tracer first block check
    a46bb28fdbdf net/mlx5: improve some comments
    333fd1095584 Revert "net/mlx5e: fix double free of encap_header"
    7bd305f5f262 wifi: mac80211: mesh_plink: fix matches_local logic
    76366b399a02 s390/vx: fix save/restore of fpu kernel context
    f40d484e1614 reset: Fix crash when freeing non-existent optional resets
    14d915ca5ae3 ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
    62ef5887dd45 ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE
    35e12efde04d ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5

(From OE-Core rev: e0e46163ca061f71db3469bef90d0f44e16df77a)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:55 -10:00
Bruce Ashfield
faec25f77c linux-yocto/5.4: update to v5.4.265
Updating  to the latest korg -stable release that comprises
the following commits:

    2d21f73b2f16 Linux 5.4.265
    5c70542f32af powerpc/ftrace: Fix stack teardown in ftrace_no_trace
    0e1867b482b4 powerpc/ftrace: Create a dummy stackframe to fix stack unwind
    9395c04666cc mmc: block: Be sure to wait while busy in CQE error recovery
    3b8b2c5d7675 ring-buffer: Fix memory leak of free page
    3459c9aa6495 team: Fix use-after-free when an option instance allocation fails
    363a67ef3ada arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify
    de8ada02369e ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS
    f451d6784ba6 soundwire: stream: fix NULL pointer dereference for multi_link
    404902216b88 perf: Fix perf_event_validate_size() lockdep splat
    4109d9a855f2 HID: hid-asus: add const to read-only outgoing usb buffer
    1fc4091991c5 net: usb: qmi_wwan: claim interface 4 for ZTE MF290
    88ceaf8e2c61 asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation
    91175d6fe505 HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad
    1f94c0d60d81 HID: hid-asus: reset the backlight brightness level on resume
    e9a3cd3dcf3f HID: add ALWAYS_POLL quirk for Apple kb
    395ad0baa4c1 platform/x86: intel_telemetry: Fix kernel doc descriptions
    af509912cd7c bcache: avoid NULL checking to c->root in run_cache_set()
    356ae9de79b7 bcache: add code comments for bch_btree_node_get() and __bch_btree_node_alloc()
    ca4b00c6cb3d bcache: avoid oversize memory allocation by small stripe_size
    e1d811cbc3de blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!"
    84f2e5b3e70f usb: aqc111: check packet for fixup for true limit
    619a34066614 Revert "PCI: acpiphp: Reassign resources on bridge if necessary"
    371dbce60a46 ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants
    be7676b03aed cred: switch to using atomic_long_t
    9112bd107208 appletalk: Fix Use-After-Free in atalk_ioctl
    23ee06762c6f net: stmmac: Handle disabled MDIO busses from devicetree
    538b7b8f21dc net: stmmac: use dev_err_probe() for reporting mdio bus registration failure
    067e6ec9f530 vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()
    cc7cf0b2ee60 sign-file: Fix incorrect return values check
    510d45207ae1 net: Remove acked SYN flag from packet in the transmit queue correctly
    5d9d500a2811 qed: Fix a potential use-after-free in qed_cxt_tables_alloc
    3df812627e7d net/rose: Fix Use-After-Free in rose_ioctl
    b099c28847cf atm: Fix Use-After-Free in do_vcc_ioctl
    e3430b870eff atm: solos-pci: Fix potential deadlock on &tx_queue_lock
    8cff60fb736b atm: solos-pci: Fix potential deadlock on &cli_queue_lock
    fcf17666ef1b qca_spi: Fix reset behavior
    51ad9c19bb57 qca_debug: Fix ethtool -G iface tx behavior
    b7f58686643f qca_debug: Prevent crash on TX ring changes
    9354e0acdb74 net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX
    053220aaed26 afs: Fix refcount underflow from error handling race

(From OE-Core rev: ca73f7645fc9cbabaea1dd81a0f59805f9f991f3)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:55 -10:00
Bruce Ashfield
00aec91f57 linux-yocto/5.4: update to v5.4.264
Updating  to the latest korg -stable release that comprises
the following commits:

    16e6e107a688 Linux 5.4.264
    06bcac5c5151 devcoredump: Send uevent once devcd is ready
    c6a1282e530d devcoredump : Serialize devcd_del work
    d99376b70247 smb: client: fix potential NULL deref in parse_dfs_referrals()
    ab5813bb2071 cifs: Fix non-availability of dedup breaking generic/304
    bdee8b2805b8 Revert "btrfs: add dmesg output for first mount and last unmount of a filesystem"
    dd9e851944aa tools headers UAPI: Sync linux/perf_event.h with the kernel sources
    4a341627a109 drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group
    fe8402511ed8 psample: Require 'CAP_NET_ADMIN' when joining "packets" group
    263bffd2b6aa genetlink: add CAP_NET_ADMIN test for multicast bind
    a149fbadb9be netlink: don't call ->netlink_bind with table lock held
    18824f592aad io_uring/af_unix: disable sending io_uring over sockets
    32f4536c108f nilfs2: fix missing error check for sb_set_blocksize call
    77a353924d8f KVM: s390/mm: Properly reset no-dat
    1aee33d43d6c x86/CPU/AMD: Check vendor in the AMD microcode callback
    3371eac21119 serial: 8250_omap: Add earlycon support for the AM654 UART controller
    ce79cf407c64 serial: sc16is7xx: address RX timeout interrupt errata
    d896c47f8cfc ARM: PL011: Fix DMA support
    880b035bc64e usb: typec: class: fix typec_altmode_put_partner to put plugs
    a9022cbdd0ae parport: Add support for Brainboxes IX/UC/PX parallel cards
    fefc0559c58e usb: gadget: f_hid: fix report descriptor allocation
    1796ae6a7a8c mmc: sdhci-sprd: Fix vqmmc not shutting down after the card was pulled
    a1f29e995fd7 mmc: core: add helpers mmc_regulator_enable/disable_vqmmc
    05918dec9a1e gpiolib: sysfs: Fix error handling on failed export
    152f51d159f3 perf: Fix perf_event_validate_size()
    84ca356ec859 perf/core: Add a new read format to get a number of lost samples
    07bdb1bd2476 arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names
    6109859f6982 arm64: dts: mediatek: mt7622: fix memory node warning check
    148d8f0707fa packet: Move reference count in packet_sock to atomic_long_t
    965cbc6b623a tracing: Fix a possible race when disabling buffered events
    6f2e50961fe3 tracing: Fix incomplete locking when disabling buffered events
    84302391d130 tracing: Always update snapshot buffer size
    cb74e8fd6b2d nilfs2: prevent WARNING in nilfs_sufile_set_segment_usage()
    610ebc289582 ALSA: pcm: fix out-of-bounds in snd_pcm_state_names
    439166b1b2ee ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt
    4fe36f83f8d8 ARM: dts: imx: make gpt node name generic
    69b669cc6389 ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
    59348f148235 scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle()
    8244ea916bfe tracing: Fix a warning when allocating buffered events fails
    4713be844546 ASoC: wm_adsp: fix memleak in wm_adsp_buffer_populate
    febb7bbe290d hwmon: (acpi_power_meter) Fix 4.29 MW bug
    ad4cf776678b RDMA/bnxt_re: Correct module description string
    b4b89b7b2d4b bpf: sockmap, updating the sg structure should also update curr
    7ffff0cc929f tcp: do not accept ACK of bytes we never sent
    69431f609bf3 netfilter: xt_owner: Fix for unsafe access of sk->sk_socket
    c61c61d7e7de net: hns: fix fake link up on xge port
    1ec21fde58da ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()
    e38cd53421ed arcnet: restoring support for multiple Sohard Arcnet cards
    f26546731933 net: arcnet: com20020 fix error handling
    d124c18267b1 net: arcnet: Fix RESET flag handling
    9f5a25aa1bcc hv_netvsc: rndis_filter needs to select NLS
    be1ab8bf0510 ipv6: fix potential NULL deref in fib6_add()
    5cd05bbaaef4 of: dynamic: Fix of_reconfig_get_state_change() return value documentation
    5cadae629e44 of: Add missing 'Return' section in kerneldoc comments
    b31cb14cac85 of: Fix kerneldoc output formatting
    36ce931a803b of: base: Fix some formatting issues and provide missing descriptions
    8c4fcbe27a7a of/irq: Make of_msi_map_rid() PCI bus agnostic
    ae374c57afeb of/irq: make of_msi_map_get_device_domain() bus agnostic
    e5cfaab66295 of/iommu: Make of_map_rid() PCI agnostic
    f7a85520087a ACPI/IORT: Make iort_msi_map_rid() PCI agnostic
    da36a3ef32b4 ACPI/IORT: Make iort_get_device_domain IRQ domain agnostic
    d786067be2eb of: base: Add of_get_cpu_state_node() to get idle states for a CPU node
    13f27a05377d drm/amdgpu: correct chunk_ptr to a pointer to chunk.
    d162a5e6a51d kconfig: fix memory leak from range properties
    d34644153050 tg3: Increment tx_dropped in tg3_tso_bug()
    cd49b8e07d01 tg3: Move the [rt]x_dropped counters to tg3_napi
    427deb5ba566 netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test
    54d0d83a5350 hrtimers: Push pending hrtimers away from outgoing CPU earlier
    34244ed6219a Linux 5.4.263
    afa7b11ea8aa mmc: block: Retry commands in CQE error recovery
    c8008304db1f mmc: core: convert comma to semicolon
    33cc97d2493f mmc: cqhci: Fix task clearing in CQE error recovery
    3e78540d98ce mmc: cqhci: Warn of halt or task clear failure
    5b87f355462a mmc: cqhci: Increase recovery halt timeout
    1a051c6d15aa cpufreq: imx6q: Don't disable 792 Mhz OPP unnecessarily
    d497e1b2f5e5 cpufreq: imx6q: don't warn for disabling a non-existing frequency
    b1a66a050f96 scsi: qla2xxx: Fix system crash due to bad pointer access
    c1f97cc21eac scsi: qla2xxx: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
    df0110425f42 scsi: core: Introduce the scsi_cmd_to_rq() function
    66cd60553045 scsi: qla2xxx: Simplify the code for aborting SCSI commands
    30511f37c997 ima: detect changes to the backing overlay file
    8c85e455f7c9 ovl: skip overlayfs superblocks at global sync
    157c8056abb5 ima: annotate iint mutex to avoid lockdep false positive warnings
    a8038ae58145 fbdev: stifb: Make the STI next font pointer a 32-bit signed offset
    939012ee31d8 mtd: cfi_cmdset_0001: Byte swap OTP info
    416dad018edd mtd: cfi_cmdset_0001: Support the absence of protection registers
    21ad8c1c4fca s390/cmma: fix detection of DAT pages
    c11027d333fd s390/mm: fix phys vs virt confusion in mark_kernel_pXd() functions family
    f1db39b1541f smb3: fix touch -h of symlink
    97d54b8005c0 net: ravb: Start TX queues after HW initialization succeeded
    7023a293e981 net: ravb: Use pm_runtime_resume_and_get()
    05aa8f3e3b77 ravb: Fix races between ravb_tx_timeout_work() and net related ops
    d37609b52977 net: stmmac: xgmac: Disable FPE MMC interrupts
    7ccf772a8bad ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
    f8b5b5d23605 Input: xpad - add HyperX Clutch Gladiate Support
    6536698eea91 btrfs: make error messages more clear when getting a chunk map
    4c6274cfd603 btrfs: send: ensure send_fd is writable
    79ffc04aba7a btrfs: fix off-by-one when checking chunk map includes logical address
    dd94ffab1b6d btrfs: add dmesg output for first mount and last unmount of a filesystem
    30b807d73654 powerpc: Don't clobber f0/vs0 during fp|altivec register save
    bb55decee202 bcache: revert replacing IS_ERR_OR_NULL with IS_ERR
    729da56e01c9 dm verity: don't perform FEC for failed readahead IO
    b515ed628447 dm-verity: align struct dm_verity_fec_io properly
    d377e593d11e ALSA: hda/realtek: Add supported ALC257 for ChromeOS
    47dd3917c48a ALSA: hda/realtek: Headset Mic VREF to 100%
    88ce27f0a3f0 ALSA: hda: Disable power-save on KONTRON SinglePC
    4a2d1399f848 mmc: block: Do not lose cache flush during CQE error recovery
    4d7d14c69667 firewire: core: fix possible memory leak in create_units()
    1eaa188f7fec pinctrl: avoid reload of p state in list iteration
    40532b29138e io_uring: fix off-by one bvec index
    9e7f410f6a43 USB: dwc3: qcom: fix wakeup after probe deferral
    db62d193e69b USB: dwc3: qcom: fix resource leaks on probe deferral
    ca44455362e3 usb: dwc3: set the dma max_seg_size
    7a0b6fc6c3c2 USB: dwc2: write HCINT with INTMASK applied
    d1c866356ddb USB: serial: option: don't claim interface 4 for ZTE MF290
    38233a62d360 USB: serial: option: fix FM101R-GL defines
    83be9405b33e USB: serial: option: add Fibocom L7xx modules
    406fae6c799b bcache: prevent potential division by zero error
    c00163256ac4 bcache: check return value from btree_node_alloc_replacement()
    a658ee793011 dm-delay: fix a race between delay_presuspend and delay_bio
    ef918a1ba40c hv_netvsc: Mark VF as slave before exposing it to user-mode
    997d895fa495 hv_netvsc: Fix race of register_netdevice_notifier and VF register
    f2a0c988d724 USB: serial: option: add Luat Air72*U series products
    f1ac7789406e s390/dasd: protect device queue against concurrent access
    300e96e171a9 bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
    76f791b78da2 ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA
    78c1e3aa693b KVM: arm64: limit PMU version to PMUv3 for ARMv8.1
    5d4f6d809efa arm64: cpufeature: Extract capped perfmon fields
    32cfd5c3b843 ext4: make sure allocate pending entry not fail
    70edeedd795a ext4: fix slab-use-after-free in ext4_es_insert_extent()
    15a84cf4c785 ext4: using nofail preallocation in ext4_es_insert_extent()
    80c8dcb09feb ext4: using nofail preallocation in ext4_es_insert_delayed_block()
    be4684ee83f3 ext4: using nofail preallocation in ext4_es_remove_extent()
    d809d1d2edc3 ext4: use pre-allocated es in __es_remove_extent()
    059722ec6464 ext4: use pre-allocated es in __es_insert_extent()
    53df96011a2f ext4: factor out __es_alloc_extent() and __es_free_extent()
    c48b5fdd465e ext4: add a new helper to check if es must be kept
    b9cd5c3afc37 MIPS: KVM: Fix a build warning about variable set but not used
    afbedd6136cb nvmet: nul-terminate the NQNs passed in the connect command
    84ac94bed02a nvmet: remove unnecessary ctrl parameter
    07009245d3ba afs: Fix file locking on R/O volumes to operate in local mode
    54ffe881d716 afs: Return ENOENT if no cell DNS record can be found
    3680d10b4181 net: axienet: Fix check for partial TX checksum
    a7e7b928049f amd-xgbe: propagate the correct speed and duplex status
    c3a77c754e7f amd-xgbe: handle the corner-case during tx completion
    895f1903ea09 amd-xgbe: handle corner-case during sfp hotplug
    7fabd97a05fc arm/xen: fix xen_vcpu_info allocation alignment
    9beba93f8ca7 net: usb: ax88179_178a: fix failed operations during ax88179_reset
    fc23517c8797 ipv4: Correct/silence an endian warning in __ip_do_redirect
    6fd145351d48 HID: fix HID device resource race between HID core and debugging support
    2c8f79610431 HID: core: store the unique system identifier in hid_device
    90b3df8b5b7d drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
    bfdda8c9c58d ata: pata_isapnp: Add missing error check for devm_ioport_map()
    9d980808f967 drm/panel: simple: Fix Innolux G101ICE-L01 timings
    cc543bad78d5 drm/panel: simple: Fix Innolux G101ICE-L01 bus flags
    c2eadc1586e7 afs: Make error on cell lookup failure consistent with OpenAFS
    7369371bb875 PCI: keystone: Drop __init from ks_pcie_add_pcie_{ep,port}()
    518b7f7d87aa RDMA/irdma: Prevent zero-length STAG registration
    d359886a7a80 driver core: Release all resources during unbind before updating device links

(From OE-Core rev: 46e99ac57dc1ae498eb54dbe36797d23439263d4)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:54 -10:00
Tim Orling
6fc1eafd3b vim: upgrade v9.0.2130 -> v9.0.2190
This is the latest/last of the 9.0.z upgrades, since 9.1 is now
released.

CVE: CVE-2024-22667
(includes the patch for .2142 b39b240c38)

Changes:
https://github.com/vim/vim/compare/v9.0.2130...v9.0.2190

(From OE-Core rev: 15c0077162f6af1908b3767b12ac79f24090b59d)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:54 -10:00
Peter Marko
6c31f05df4 gcc-shared-source: whitelist CVE-2023-4039
Concept of gcc-source prevents cve-check to detect existing
CVE patch file.
So whitelist this CVE in all recipes using gcc-source via this
include file.

(From OE-Core rev: 04511734c6dc8c7dda3a943b385cd273d012d8c7)

(From OE-Core rev: 037f640b9272ba055ee41eeb1e6e9b002faefe36)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
(cherry picked from commit d803ca6531)
Signed-off-by: Dnyandev Padalkar <padalkards17082001@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-27 05:42:54 -10:00
Simone Weiß
b110cd3d82 dev-manual: gen-tapdevs need iptables installed
Add the hint to the test setup that runqemu-gen-tapdevs will need the
iptables package installed.

(From yocto-docs rev: f703ac90d4fe6f004997e963c0cfc98c223bc146)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-16 03:35:52 -10:00
Zahir Hussain
aa02dc871f cmake: Unset CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
As discussion in [YOCTO #14717] cmake contains a OEToolchainConfig.cmake
file to configure the toolchain correctly in cross-compile build for recipes
using cmake.

The variable CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES value updates incorrectly
during do_compile the code. Due to this getting sporadic error like below,

fatal error: stdlib.h: No such file or directory
|    75 | #include_next <stdlib.h>
|       |               ^~~~~~~~~~
| compilation terminated.
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.

As cmake already correctly initializes the variable from environment,
So we have to unset it in the toolchain file to avoid overwriting the
variable definition again.

(From OE-Core rev: 7ab6087536bc67c63094f08f863dcd3d5e35b8e7)

Signed-off-by: aszh07 <mail2szahir@gmail.com>
Signed-off-by: Zahir Hussain <zahir.basha@kpit.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5aeada5793af53e8c93940952d4f314474dca4c2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-16 03:35:51 -10:00
Matthias Schmitz
c846f0d89c rsync: Fix rsync hanging when used with --relative
Fixes [YOCTO #15383]

This bug was introduced into upstream when fixing CVE-2022-29154. It was
later discovered and fixed upstream but this fix didn't make it into
poky yet.
The added patch is taken from upstreams git repository:
fabef23bea

(From OE-Core rev: fb448f87c0b3906b91d453451083dc003ac94ebe)

Signed-off-by: Matthias Schmitz <matthias.schmitz@port4949.net>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-16 03:35:51 -10:00
virendra thakur
fa23359034 ncurses: Fix CVE-2023-29491
memory corruption when processing malformed terminfo data entries
loaded by setuid/setgid programs

CVE-2023-29491.patch change the --disable-root-environ configure option
behavior.
set --disable-root-environ in configuration options.

--disable-root-environ option with a few additional changes
to the code allows us to mitigate CVE-2023-29491 and avoid
other issues that involve the possibility of malicious use of
environment variables through setuid applications, and, therefore,
it was the fix chosen in order to resolve this vulnerability.

Reference:
https://ubuntu.com/security/CVE-2023-29491
https://launchpad.net/ubuntu/+source/ncurses/6.2-0ubuntu2.1

(From OE-Core rev: 041433f0767ae9112f6a74a7d7c93ce9b411792c)

Signed-off-by: virendra thakur <virendrak@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-16 03:35:51 -10:00
Ming Liu
eb0915c699 go: add a complementary fix for CVE-2023-29406
The original CVE-2023-29406.patch is not complete, causing docker
failures at runtime, backport a complementary fix from golang upstream.

(From OE-Core rev: bff621d5399e5ff2930d21f403bb2f274febd2e4)

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-16 03:35:51 -10:00
Vijay Anusuri
5c5d9d5bcc ghostscript: Backport fix for CVE-2020-36773
Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;h=8c7bd787defa071c96289b7da9397f673fddb874]

(From OE-Core rev: 1a25a8ebedf39f1a868fcf646684b2eeaa67301f)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-16 03:35:51 -10:00
virendra thakur
1c77446c96 perl: Whitelist CVE-2023-47039
This CVE is related to Windows.

Link: https://nvd.nist.gov/vuln/detail/CVE-2023-47039

(From OE-Core rev: 970a0a64ce147970c7743411584c9bd1dc1ce414)

Signed-off-by: virendra thakur <virendrak@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-16 03:35:51 -10:00
Peter Marko
2c6b82aaf0 curl: ignore CVE-2023-42915
This CVE reports that apple had to upgrade curl because of other
already reported CVEs:
* CVE-2023-38039: not affected, introduced in 7.84.0
* CVE-2023-38545: patch already backported
* CVE-2023-38546: patch already backported
* CVE-2023-42915: reference to itself

(From OE-Core rev: 067740c834a98cd8f5cfff7f73418d18b8e1249a)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-16 03:35:51 -10:00
Alassane Yattara
12fab85ba1 bitbake: toaster/toastergui: Bug-fix verify given layer path only if import/add local layer
(Bitbake rev: 7ce4107bf824b3e115b40558336de25f99af31f8)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-07 04:10:22 -10:00
Khem Raj
b22e4f002d systemtap: Fix build with gcc-12
Backport a patch to fix
| ../git/util.cxx:1766:56: error: 'std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result (*)(_Arg)) [with _Arg = int; _Result = int]' is deprecated: use 'std::function' instea
d [-Werror=deprecated-declarations]
|  1766 |                        std::not1(std::ptr_fun<int, int>(std::isspace))));
|       |                                  ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

(From OE-Core rev: 18ae4fea4bf8681f9138d21124589918e336ff6b)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0b360d12203aafd8bf96433d11221a6ed910a11f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
virendra thakur
a528dc22aa opkg: Fix bad memory access error observe in file_read_line_alloc
In the case of a zero length string being returned by fgets(), the condition
checking for a trailing new line would perform a bad memory access outside
of `buf`. This might happen when line with a leading null byte is read.

Avoid this case by checking that the string has a length of at least one
byte.

Link: 8b45a3c4ca

(From OE-Core rev: 32e3618891295cec1ee5d4195998aa97f93b2207)

Signed-off-by: virendra thakur <virendrak@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
Vijay Anusuri
4bda99df75 xserver-xorg: Multiple CVE fixes
Fix below CVE's
CVE-2023-6816
CVE-2024-0229
CVE-2024-21885
CVE-2024-21886
CVE-2024-0408
CVE-2024-0409

(From OE-Core rev: 14ffb41e7a49a4c0076db9ec4449a97c0f143b67)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
Vijay Anusuri
70de5ee7d1 pam: Fix for CVE-2024-22365
Upstream-Status: Backport from 031bb5a5d0

(From OE-Core rev: a3fbe1156fccb3e60a183263a3bde5a8ef6725a8)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
Vijay Anusuri
574b303503 gnutls: Backport fix for CVE-2024-0553
CVE-2024-0553
A vulnerability was found in GnuTLS. The response times to malformed ciphertexts in RSA-PSK ClientKeyExchange differ from response times of ciphertexts with correct PKCS#1 v1.5 padding. This issue may allow a remote attacker to perform a timing side-channel attack in the RSA-PSK key exchange, potentially leading to the leakage of sensitive data. CVE-2024-0553 is designated as an incomplete resolution for CVE-2023-5981.

Upstream-Status: Backport [40dbbd8de4]

(From OE-Core rev: a07cc0b6fa4a485f318fd2957e434b63f5907d7e)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
Vijay Anusuri
bffa4f3051 gnutls: Backport fix for CVE-2023-5981
Upstream-Status: Backport [import from ubuntu https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gnutls28/3.6.13-2ubuntu1.9/gnutls28_3.6.13-2ubuntu1.9.debian.tar.xz
Upstream-Commit: 29d6298d0b]

References:
https://ubuntu.com/security/CVE-2023-5981

(From OE-Core rev: 087b7c5d8363bcc6ae801d3ca18e6490e86a1381)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
Vijay Anusuri
9bf63ee197 sqlite3: Backport fix for CVE-2023-7104
Backport https://sqlite.org/src/info/0e4e7a05c4204b47

(From OE-Core rev: 2a418c0a55d0d4e9a70a41c9a7cfea97ec0edee9)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
Ranjitsinh Rathod
3adc98348b openssh: Fix CVE-2023-51385
OS command injection might occur if a user name or host name has shell
metacharacters, and this name is referenced by an expansion token in
certain situations. For example, an untrusted Git repository can have a
submodule with shell metacharacters in a user name or host name.

This patch fixes the above issue

Link: http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh_8.2p1-4ubuntu0.11.debian.tar.xz
Link: 7ef3787c84

(From OE-Core rev: a0561ca36bd3be8f44d11908caaf8c9ce5f69032)

Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
Signed-off-by: Ranjitsinh Rathod <ranjitsinhrathod1991@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
Diego Sueiro
8f7ce1acf7 bitbake: layerindex: Fix bitbake-layers layerindex-show-depends command
Running 'bitbake-layers layerindex-show-depends meta-filesystems' fails with:
```
Traceback (most recent call last):
  File "<...>/poky/bitbake/bin/bitbake-layers", line 93, in <module>
    ret = main()
  File "<...>/poky/bitbake/bin/bitbake-layers", line 86, in main
    return args.func(args)
  File "<...>/poky/bitbake/lib/bblayers/layerindex.py", line 209, in do_layerindex_show_depends
    self.do_layerindex_fetch(args)
  File "<...>/poky/bitbake/lib/bblayers/layerindex.py", line 182, in do_layerindex_fetch
    args.shallow)
AttributeError: 'Namespace' object has no attribute 'shallow'
```

Initialize the shallow attribute to fix it.

(Bitbake rev: 146cd25252ef065d09df0980b7dc670cb7e7b109)

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-31 03:51:10 -10:00
Steve Sakoman
a9e3cc3b9e build-appliance-image: Update to dunfell head revision
(From OE-Core rev: 82e67bd9c77f0c5cbb652ca91071b9e57bdcfb33)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-22 03:37:47 -10:00
Steve Sakoman
378b447059 poky.conf: bump version for 3.1.31
(From meta-yocto rev: 11fa082996c6c9e95b2f31eabaf22bc7167fe370)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-22 03:31:37 -10:00
Steve Sakoman
adfae38944 documentation: update for 3.1.31
(From yocto-docs rev: b56d349ae7cabf7d84d5dbde3751d93ab2f11747)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-22 03:31:37 -10:00
Maxin B. John
40c106bc61 ref-manual: classes: remove insserv bbclass
insserv.bbclass was removed from oe-core:

commit e6bb5dbb62
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Sun May 10 12:30:49 2015 +0100

insserv: Remove

(From yocto-docs rev: 383fbedb057ffb28dddf201995ae622ce7b7eff5)

Signed-off-by: Maxin John <maxin.john@gmail.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-22 03:31:37 -10:00
Simone Weiß
acf1b57188 dev-manual: start.rst: update use of Download page
The yocto website has changed its structure. Update the section for
Accessing the Downloads page to match the new structure.

(From yocto-docs rev: f9a3b59c130d498c02dfdc016958c92ac74737a7)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-22 03:31:37 -10:00
Vijay Anusuri
d9d1a730ae libtiff: Fix for CVE-2023-6228
Upstream-Status: Backport [1e7d217a32]

(From OE-Core rev: ff66998ef81dbc35465e30eec96ee9be51f5da80)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-21 08:33:19 -10:00
Vijay Anusuri
854aafaea4 qemu: Backport fix for CVE-2023-2861
Updated 0012-fix-libcap-header-issue-on-some-distro.patch to resolve
patch fuzz caused by the CVE-2023-2861 patch

Upstream-Status: Backport
[a5804fcf7b
&
f6b0de53fb]

(From OE-Core rev: cede843cdd1d1a83b2d616086aa69a2b584f9442)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-21 08:33:19 -10:00
Peter Marko
7e3b27865d zlib: ignore CVE-2023-6992
This CVE is for iCPE cloudflare:zlib.

Alternative to ignoring would be to limit CVE_PRODUCT, but
historic CVEs already have two - gnu:zlib and zlib:zlib.
So limiting it could miss future CVEs.

(From OE-Core rev: 5dc87309639e78195eb1283afc193f6eac63b044)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-21 08:33:19 -10:00
Vijay Anusuri
2f7e1a230e libxml2: Fix for CVE-2023-45322
Backport patch for gitlab issue mentioned in NVD CVE report.
* https://gitlab.gnome.org/GNOME/libxml2/-/issues/583
Backport also one of 14 patches for older issue with similar errors
to have clean cherry-pick without patch fuzz.
* https://gitlab.gnome.org/GNOME/libxml2/-/issues/344

The CVE is disputed because the maintainer does not think that
errors after memory allocation failures are not critical enough
to warrant a CVE ID.
This patch will formally fix reported error case, trying to backport
another 13 patches and resolve conflicts would be probably overkill
due to disputed state.
This CVE was ignored on master branch (as diputed).

(From OE-Core rev: 03b766e42beb42a2085285308acbcf941f346b06)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-21 08:33:19 -10:00
Vijay Anusuri
0948746aac xserver-xorg: Fix for CVE-2023-6377 and CVE-2023-6478
Upstream-Status: Backport
[0c1a93d319
& 14f480010a]

(From OE-Core rev: f5eff24d386215e5b5aee5c3261f5602b47c7f02)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-21 08:33:19 -10:00
Vijay Anusuri
5c5aa47adb go: Backport fix for CVE-2023-45287
Upstream-Status: Backport
[9baafabac9
&
c9d5f60eaa
&
8f676144ad
&
8a81fdf165]

(From OE-Core rev: 20e1d10a3ebefc8c5237c065c25eba4182d22efd)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-21 08:33:18 -10:00
Michael Opdenacker
b418ede994 ref-manual: update tested and supported distros
According to currently active workers
https://autobuilder.yoctoproject.org/typhoon/#/workers
and to the "workers_prev_releases" definition
in https://git.yoctoproject.org/yocto-autobuilder2/tree/config.py

Also correct the text saying that SANITY_TESTED_DISTROS
lists currently tested distros.

Also replace AlmaLinux 8.8 and 9.2 by just AlmaLinux 8 and 9,
as we update our workers anyway.

(From yocto-docs rev: db466a25a3cf8dfb660f65c12573265a702d0d8f)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-10 03:57:04 -10:00
Dmitry Baryshkov
dc5397b0f6 linux-firmware: upgrade 20230804 -> 20231030
License-Update: additional firmwares

(From OE-Core rev: b3dd6852c0d6b8aa9b36377d7024ac95062e8098)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 7c725d1f2ed9a271d39d899ac2534558c2d103fc)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-10 03:57:03 -10:00
Dhairya Nagodra
60b073d8c3 cve-update-nvd2-native: increase the delay between subsequent request failures
Sometimes NVD servers are unstable and return too many errors.
There is an option to have higher fetch attempts to increase the chances
of successfully fetching the CVE data.

Additionally, it also makes sense to progressively increase the delay
after a failed request to an already unstable or busy server.
The increase in delay is reset after every successful request and
the maximum delay is limited to 30 seconds.

Also, the logs are improved to give more clarity.

(From OE-Core rev: 9e03b7a9879fd16e32f4eccb78b438f6fa9db74d)

Signed-off-by: Dhairya Nagodra <dnagodra@cisco.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 7101d654635b707e56b0dbae8c2146b312d211ea)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-10 03:57:03 -10:00
Dhairya Nagodra
11a511fbc9 cve-update-nvd2-native: faster requests with API keys
As per NVD, the public rate limit is 5 requests in 30s (6s delay).
Using an API key increases the limit to 50 requests in 30s (0.6s delay).
However, NVD still recommends sleeping for several seconds so that the
other legitimate requests are serviced without denial or interruption.
Keeping the default sleep at 6 seconds and 2 seconds with an API key.

For failures, the wait time is unchanged (6 seconds).

Reference: https://nvd.nist.gov/developers/start-here#RateLimits

(From OE-Core rev: eb5ab00be33a503205401541e88c32ba9da1d75c)

Signed-off-by: Dhairya Nagodra <dnagodra@cisco.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 5c32e2941d1dc3d04a799a1b7cbd275c1ccc9e79)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-10 03:57:03 -10:00
Peter Marko
1a94a64268 cve-update-nvd2-native: make number of fetch attemtps configurable
Sometimes NVD servers are unstable and return too many errors.

Last time we increased number of attempts from 3 to 5, but
further increasing is not reasonable as in normal case
too many retries is just abusive.

Keep retries low as default and allow to increase as needed.

(From OE-Core rev: ee2a6ade703317d09f7df60ef7ce300d8f868f54)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6b6fd8043d83b99000054ab6ad2c745d07c6bcc1)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-10 03:57:03 -10:00
Peter Marko
982ab5d6d9 cve-update-nvd2-native: remove unused variable CVE_SOCKET_TIMEOUT
This variable is not referenced in oe-core anymore.

(From OE-Core rev: 70676801f1f8fe498ff34fc1db72b6a3bf438d4a)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 905b45a814cb33327503b793741c19b44c8550b3)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-10 03:57:03 -10:00
Shubham Kulkarni
8873e8d033 tzdata: Upgrade to 2023d
(From OE-Core rev: 3ea36d92800b139eaaf75995cdd59912b63db9ee)

Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2956b1aa22129951b8c08ac06ff1ffd66811a26c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-05 03:25:39 -10:00
Vijay Anusuri
bcf4caec9e qemu: Fix CVE-2023-5088
A bug in QEMU could cause a guest I/O operation otherwise
addressed to an arbitrary disk offset to be targeted to
offset 0 instead (potentially overwriting the VM's boot code).

This change is to fix CVE-2023-5088.

Link: 7d7512019f

(From OE-Core rev: df9e2d40c52b752940de61388997e485da56de0c)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-05 03:25:39 -10:00
Vijay Anusuri
a2bf2f28c4 go: Fix CVE-2023-39326
A malicious HTTP sender can use chunk extensions to cause a receiver
reading from a request or response body to read many more bytes from
the network than are in the body. A malicious HTTP client can further
exploit this to cause a server to automatically read a large amount
of data (up to about 1GiB) when a handler fails to read the entire
body of a request. Chunk extensions are a little-used HTTP feature
which permit including additional metadata in a request or response
body sent using the chunked encoding. The net/http chunked encoding
reader discards this metadata. A sender can exploit this by inserting
a large metadata segment with each byte transferred. The chunk reader
now produces an error if the ratio of real body to encoded bytes grows
too small.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-39326
https://security-tracker.debian.org/tracker/CVE-2023-39326

(From OE-Core rev: 5b55648f3142762c9563289c1b19aa3b7de27164)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-05 03:25:38 -10:00
Richard Purdie
c0e5370a91 bitbake: lib/bb: Add workaround for libgcc issues with python 3.8 and 3.9
With python 3.8 and 3.9, we see intermittent errors of:

libgcc_s.so.1 must be installed for pthread_cancel to work
Aborted (core dumped)

which seem related to:

https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work
https://bugs.ams1.psf.io/issue42888

These tend to occur on debian 11 and ubuntu 20.04.

Workaround this by ensuring libgcc is preloaded in all cases.

(Bitbake rev: 36959b25c64044dd4bca65bd1bb1243823d51545)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-05 03:25:38 -10:00
Insu Park
e25b0dcc9e bitbake: data: Add missing dependency handling of remove operator
A recipe variable handles its dependencies even on the "contains"
variables within the "inline Python expressions" like bb.utils.filter().
And it also handles those in the append operator correctly, but the
problem is that it does not so in the remove operator.

Fix it by adding the missing dependencies every time the remove
operator has been handled.
Also add a test case to check if the override operators handle
dependencies correctly.

(Bitbake rev: 48799c68b69b7921c809e0fc970303866643eb2a)

Signed-off-by: Insu Park <insu0.park@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Cherry-picked from master: b90520eedb1dbc7f6a3928d089fe74fafb864eb5
- Conflicts in data.py are resolved as the master branch moved
  handle_contains() and handle_remove() out of the try block
  and added the 3rd argument, "exclusions", to handle_contains().
- The test code in codeparser.py are modified as the master branch
  added three more arguments to the build_dependencies().

Signed-off-by: Insu Park <insu0.park@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-01-05 03:25:38 -10:00
Steve Sakoman
80cc03ec40 testimage: drop target_dumper and host_dumper
The target_dumper code is basically broken. It has been reading binary files
over the text base serial communication and runs at every command failure which
makes no sense. Each run might overwrite files from the previous run and the
output appears corrupted due to confusion from the binary data.

It isn't possible to cherry-pick "testimage: Drop target_dumper and most of monitor_dumper"
from master, so just make target_dumper and host_dumper empty functions.

For further details see:

https://lists.openembedded.org/g/openembedded-architecture/message/1888

(From OE-Core rev: 94e9019d2f170a26206c2774381a1d183313ecaa)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-29 05:29:14 -10:00
Hitendra Prajapati
1de3816043 bluez5: fix CVE-2023-45866
Upstream-Status: Backport from https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=25a471a83e02e1effb15d5a488b3f0085eaeb675

(From OE-Core rev: 1df2bdf370346dac70451159adf1ae85d1a2dacd)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-29 05:29:14 -10:00
Vijay Anusuri
fc412fa80d openssh: backport Debian patch for CVE-2023-48795
import patches from ubuntu to fix
 CVE-2023-48795

Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/openssh/tree/debian/patches?h=ubuntu%2Ffocal-security
Upstream commit 1edb00c58f]

Reference: https://ubuntu.com/security/CVE-2023-48795

(From OE-Core rev: 4026a1cc3aa242a80c306b34b030f05d41b55dda)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-29 05:29:14 -10:00
Virendra Thakur
0aa12e4919 binutils: fix multiple cve
Fix below CVE's
CVE-2022-47007
CVE-2022-47008
CVE-2022-47010
CVE-2022-47011
CVE-2022-48063
CVE-2022-47695

(From OE-Core rev: 873163936937a583278e3cd97c6226935f2faa0c)

Signed-off-by: Virendra Thakur <virendrak@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-29 05:29:14 -10:00
Vijay Anusuri
3433d043c7 flac: Backport fix for CVE-2021-0561
Upstream-Status: Backport [e1575e4a7c]

(From OE-Core rev: 9b2cd2d5e0dac297b3a1779e6720e0ee2a3de168)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-29 05:29:13 -10:00
Lee Chee Yang
39aad83070 curl: fix CVE-2023-46218
import patch from ubuntu
http://archive.ubuntu.com/ubuntu/pool/main/c/curl/curl_7.68.0-1ubuntu2.21.debian.tar.xz

upstream https://github.com/curl/curl/commit/2b0994c29a721c91c57

(From OE-Core rev: 7bf11847b18d2f9a7e5467d686af817cb504b206)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-29 05:29:13 -10:00
Richard Purdie
ef0c19babe testimage: Exclude wtmp from target-dumper commands
wtmp is filled with binary data which the run_serial command can't cope with.
Catting this results in confusion of the serial interface and potentially large
backlogs of data in the buffers which can hang qemu.

Exclude the problematic files from the command.

(From OE-Core rev: 05d9f9c6b27c0216fa4e349109ef42cf91bb4084)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 599ac08a6f6fb3f6a89a897c8e06367c63c2f979)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-21 05:17:55 -10:00
Vijay Anusuri
6b9d89ec0b libxml2: Backport fix for CVE-2021-3516
Upstream-Status: Backport [1358d157d0]

(From OE-Core rev: 29c182375d91806d1e802b026f84b24e7c5d4b35)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-21 05:17:55 -10:00
Vivek Kumbhar
c7fbe91c2a libsndfile: fix CVE-2021-4156 heap out-of-bounds read in src/flac.c in flac_buffer_copy
Upstream-Status: Backport from ced91d7b97

(From OE-Core rev: d922a288f79834d8f1120a4454b97803290e5c36)

Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-21 05:17:55 -10:00
Lee Chee Yang
3eda06c358 binutils: Fix CVE-2023-25584
import patch from ubuntu to fix CVE-2023-25584
http://archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.34-6ubuntu1.7.debian.tar.xz

upstream patch :
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=77c225bdeb410cf60da804879ad41622f5f1aa44

(From OE-Core rev: 8eff0e0ce44c60efcf6bec083d5794313f3ac4ad)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-21 05:17:55 -10:00
Lee Chee Yang
8efd61ccb1 perl: fix CVE-2023-31484/47038/47100
import patch from ubuntu
http://archive.ubuntu.com/ubuntu/pool/main/p/perl/perl_5.30.0-9ubuntu0.5.debian.tar.xz

fix:
CVE-2023-31484
CVE-2023-47038
CVE-2023-47100

as per https://ubuntu.com/security/CVE-2023-47100 ,
CVE-2023-47100 is duplicate of CVE-2023-47038.

perl import entire CPAN in single commit,
hence backport fix from their upstream cpan instead.

(From OE-Core rev: 74861848ba0d3ba920ef54f016240807ba42682a)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-21 05:17:55 -10:00
Bhabu Bindu
43fa25ea6f glibc: Fix CVE-2023-4813
Add patch to fix CVE-2023-4813

Link: https://security-tracker.debian.org/tracker/CVE-2023-4813

(From OE-Core rev: d735b2a94091f9a4a91917c73bd73d9ce4a31e3e)

Signed-off-by: Bhabu Bindu <bhabu.bindu@kpit.com>
Signed-off-by: Poonam Jadhav <ppjadhav456@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-21 05:17:55 -10:00
Marta Rybczynska
f56b099225 bitbake: toastergui: verify that an existing layer path is given
Verify that an existing layer path was given when adding a new
layer.

Manually using the shell for globbing is unnecessary, use the glob
function instead for cleaner code.

(Bitbake rev: 48d1d18c23b3f514dc7a1ee12cc35cf5993af88d)

Signed-off-by: Marta Rybczynska <marta.rybczynska@syslinbit.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-21 05:17:55 -10:00
Steve Sakoman
dbe19706ec build-appliance-image: Update to dunfell head revision
(From OE-Core rev: 55157aa2f8b157b1cc63e1134d9eba6db0cf16da)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-11 05:16:30 -10:00
Bruce Ashfield
b86bf0103c linux-yocto-rt/5.4: fix buld failure
Integrating the following commit(s) to linux-yocto/5.4:

1/1 [
    Author: Bruce Ashfield
    Email: bruce.ashfield@gmail.com
    Subject: rt: drop -stable migrate_disable
    Date: Mon, 11 Dec 2023 08:50:52 -0500

    The -rt branches already have a migrate disable mechanism, we
    drop the -stable version to fix build issues.

    Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
]

(From OE-Core rev: f29aff4a2a907f70c5397f9f1f7b5c1f8beb8647)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-11 05:13:16 -10:00
Steve Sakoman
bf9eabafc2 build-appliance-image: Update to dunfell head revision
(From OE-Core rev: 7e65b351fa8eda4ee7b9f1f2a8dbfe14e0ef697a)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-10 06:03:17 -10:00
Ross Burton
8c297c4b42 bitbake: siggen: use correct umask when writing siginfo
We try to write sstate with group-write permissions so that sstate-cache
can be shared between multiple users.  However the siginfo files are
created in various tasks which may set their own umask (such as
do_populate_sysroot, 0022).  This results in no group write permission
on the intermediate directories, which is fatal when sharing a cache.

Fix this by wrapping the siginfo mkdir in a umask change to 0002.

(Bitbake rev: c0d60794a32e3f8bbfbbd6800d87ef2782aacf2c)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-10 05:55:55 -10:00
Ross Burton
658a3832de bitbake: utils: add umask changing context manager
Add a umask context manager which can be used to temporarily change the
umask in a 'with' block.

(Bitbake rev: 6ca998054e422da72c7906d3ec4f204d88c32ee0)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-10 05:55:55 -10:00
Steve Sakoman
0b105ed7c8 build-appliance-image: Update to dunfell head revision
(From OE-Core rev: 0abf394b12c7cd5c24da1eb6ab24bec30658998a)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:49:08 -10:00
Steve Sakoman
25972743e6 poky.conf: bump version for 3.1.30
(From meta-yocto rev: 795cef721de8e993bc2561e6c89caa6f10ee206a)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Steve Sakoman
2e5bead98f documentation: update for 3.1.30
(From yocto-docs rev: 2bf8c79006a7ea17f123f585b32cf8fedaea9bb5)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Steve Sakoman
7dd1d3973e cve-exclusion_5.4.inc: update for 5.4.262
(From OE-Core rev: fa5f8927e547da16588cf11dcf090f4ed53f3933)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Bruce Ashfield
9e0ebdc95f linux-yocto/5.4: update to v5.4.262
Updating  to the latest korg -stable release that comprises
the following commits:

    8e221b47173d Linux 5.4.262
    b053223b7cf4 netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush (for 5.4)
    c35df8b8c572 netfilter: nf_tables: disable toggling dormant table state more than once
    e10f661adc55 netfilter: nf_tables: fix table flag updates
    46c2947fcd71 netfilter: nftables: update table flags from the commit phase
    b09e6ccf0d12 netfilter: nf_tables: double hook unregistration in netns path
    b05a24cc453e netfilter: nf_tables: unregister flowtable hooks on netns exit
    a995a68e8a3b netfilter: nf_tables: fix memleak when more than 255 elements expired
    b95d7af657a8 netfilter: nft_set_hash: try later when GC hits EAGAIN on iteration
    61a7b3de20e2 netfilter: nft_set_rbtree: use read spinlock to avoid datapath contention
    03caf75da105 netfilter: nft_set_rbtree: skip sync GC for new elements in this transaction
    021d734c7eaa netfilter: nf_tables: defer gc run if previous batch is still pending
    38ed6a5f836f netfilter: nf_tables: use correct lock to protect gc_list
    4b6346dc1edf netfilter: nf_tables: GC transaction race with abort path
    b76dcf466223 netfilter: nf_tables: GC transaction race with netns dismantle
    29ff9b8efb84 netfilter: nf_tables: fix GC transaction races with netns and netlink event exit path
    1398a0eee290 netfilter: nf_tables: remove busy mark and gc batch API
    85520a1f1d87 netfilter: nft_set_hash: mark set element as dead when deleting from packet path
    c357648929c8 netfilter: nf_tables: adapt set backend to use GC transaction API
    bbdb3b65aa91 netfilter: nf_tables: GC transaction API to avoid race with control plane
    1da4874d05da netfilter: nf_tables: don't skip expired elements during walk
    acaee227cf79 netfilter: nft_set_rbtree: fix overlap expiration walk
    899aa5638568 netfilter: nft_set_rbtree: fix null deref on element insertion
    181859bdfb97 netfilter: nft_set_rbtree: Switch to node list walk for overlap detection
    3c7ec098e3b5 netfilter: nf_tables: drop map element references from preparation phase
    6b880f3b2c04 netfilter: nftables: rename set element data activation/deactivation functions
    e1eed9e0b5e8 netfilter: nf_tables: pass context to nft_set_destroy()
    961c4511c757 tracing: Have trace_event_file have ref counters
    7676a41d90c5 drm/amdgpu: fix error handling in amdgpu_bo_list_get()
    36383005f1db ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks
    e95f74653dff ext4: correct the start block of counting reserved clusters
    1fbfdcc3d65e ext4: correct return value of ext4_convert_meta_bg
    dfdfd3f21830 ext4: correct offset of gdb backup in non meta_bg group to update_backups
    85c12e80c474 ext4: apply umask if ACL support is disabled
    d2aed8814f02 Revert "net: r8169: Disable multicast filter for RTL8168H and RTL8107E"
    b9e5f633b35d nfsd: fix file memleak on client_opens_release
    339d7d40d3dc media: venus: hfi: add checks to handle capabilities from firmware
    cab97cdd409a media: venus: hfi: fix the check to handle session buffer requirement
    5d39d0c1f43f media: venus: hfi_parser: Add check to keep the number of codecs within range
    497b12d47cc6 media: sharp: fix sharp encoding
    92d8a0478fb3 media: lirc: drop trailing space from scancode transmit
    cac054d10324 i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
    b132e462363f net: dsa: lan9303: consequently nested-lock physical MDIO
    229738d71702 Revert ncsi: Propagate carrier gain/loss events to the NCSI controller
    4074957ec6bb Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE
    356a2ee5fc36 Bluetooth: btusb: Add RTW8852BE device 13d3:3570 to device tables
    afe92b66a5d8 bluetooth: Add device 13d3:3571 to device tables
    dc073a2626d3 bluetooth: Add device 0bda:887b to device tables
    75d26f7f6118 Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x0cb8:0xc559
    323710a6b4c6 Bluetooth: btusb: add Realtek 8822CE to usb_device_id table
    981ee23b8d48 Bluetooth: btusb: Add flag to define wideband speech capability
    0fe69c99cc13 tty: serial: meson: fix hard LOCKUP on crtscts mode
    8f40bbf7dc01 serial: meson: Use platform_get_irq() to get the interrupt
    a1113f2c9b2c tty: serial: meson: retrieve port FIFO size from DT
    13391526d817 serial: meson: remove redundant initialization of variable id
    6245d0d70fe8 ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC
    4ef452297de4 ALSA: info: Fix potential deadlock at disconnection
    c7df9523fed2 parisc/pgtable: Do not drop upper 5 address bits of physical address
    c32dfec86714 parisc: Prevent booting 64-bit kernels on PA1.x machines
    d570d139cb38 i3c: master: cdns: Fix reading status register
    ad6941b192ca mm/cma: use nth_page() in place of direct struct page manipulation
    36512866607e dmaengine: stm32-mdma: correct desc prep when channel running
    4a5c267d5700 mcb: fix error handling for different scenarios when parsing
    25eb381a736e i2c: core: Run atomic i2c xfer when !preemptible
    975b5ff33f9a kernel/reboot: emergency_restart: Set correct system_state
    421f9ccc75c5 quota: explicitly forbid quota files from being encrypted
    7d0c36cd2e65 jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev
    665c2f186b8c btrfs: don't arbitrarily slow down delalloc if we're committing
    b5a8382cf829 PM: hibernate: Clean up sync_read handling in snapshot_write_next()
    2b3cfdaa8833 PM: hibernate: Use __get_safe_page() rather than touching the list
    612c17a90fce mmc: vub300: fix an error code
    398940412e8d clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from PLL clocks
    0b2b22b706ec parisc/pdc: Add width field to struct pdc_model
    012dba0ab814 PCI: keystone: Don't discard .probe() callback
    9988c9dc3c8b PCI: keystone: Don't discard .remove() callback
    a438322e0078 genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
    683c562c434d mmc: meson-gx: Remove setting of CMD_CFG_ERROR
    d894f9288cff ACPI: resource: Do IRQ override on TongFang GMxXGxx
    7b15bc9b753f PCI/sysfs: Protect driver's D3cold preference from user space
    78d3487b5b87 hvc/xen: fix error path in xen_hvc_init() to always register frontend driver
    6b21ae025b82 audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()
    c0d01f03aaac audit: don't take task_lock() in audit_exe_compare() code path
    4d0a828775f0 KVM: x86: Ignore MSR_AMD64_TW_CFG access
    5066faedd2f7 KVM: x86: hyper-v: Don't auto-enable stimer on write from user-space
    268d17ab637a x86/cpu/hygon: Fix the CPU topology evaluation for real
    acbc12b0b348 scsi: megaraid_sas: Increase register read retry rount from 3 to 30 for selected registers
    bae690510316 bpf: Fix precision tracking for BPF_ALU | BPF_TO_BE | BPF_END
    6933bc9a5f77 randstruct: Fix gcc-plugin performance mode to stay in group
    c94d05ac6937 media: venus: hfi: add checks to perform sanity on queue pointers
    6d028ade9db7 cifs: spnego: add ';' in HOST_KEY_LEN
    26415e35f669 tools/power/turbostat: Fix a knl bug
    a49786297b83 macvlan: Don't propagate promisc change to lower dev in passthru
    04cb9ab8ebc5 net/mlx5e: Check return value of snprintf writing to fw_version buffer for representors
    c740f4716a44 net/mlx5_core: Clean driver version and name
    e4bdbcce8e02 net/mlx5e: fix double free of encap_header
    5cc1f24f7333 net: stmmac: fix rx budget limit check
    c4b712d1a814 net: stmmac: Rework stmmac_rx()
    b2762d13dfae netfilter: nf_conntrack_bridge: initialize err to 0
    fd51e7541ff6 net: ethernet: cortina: Fix MTU max setting
    823bffdaac39 net: ethernet: cortina: Handle large frames
    f5055d7345d6 net: ethernet: cortina: Fix max RX frame define
    b4f0e605a508 bonding: stop the device in bond_setup_by_slave()
    7ea0a719e578 ptp: annotate data-race around q->head and q->tail
    89af55e0fa13 xen/events: fix delayed eoi list handling
    db957a2f5481 ppp: limit MRU to 64K
    f3b250d91993 tipc: Fix kernel-infoleak due to uninitialized TLV value
    77236275d4cd net: hns3: fix variable may not initialized problem in hns3_init_mac_addr()
    14c6cd41c851 tty: Fix uninit-value access in ppp_sync_receive()
    4d2d30f0792b ipvlan: add ipvlan_route_v6_outbound() helper
    ed53c1518811 NFSv4.1: fix SP4_MACH_CRED protection for pnfs IO
    fe449f8b9727 wifi: iwlwifi: Use FW rate for non-data frames
    eca19db60f99 pwm: Fix double shift bug
    d996530ba92c ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings
    6d703922bc9e kgdb: Flush console before entering kgdb on panic
    eac3e4760aa1 drm/amd/display: Avoid NULL dereference of timing generator
    514565ff7fce media: cobalt: Use FIELD_GET() to extract Link Width
    2bb42a27a92f gfs2: ignore negated quota changes
    a251e20a2cbe media: vivid: avoid integer overflow
    8f83c85ee882 media: gspca: cpia1: shift-out-of-bounds in set_flicker
    a8f829886d47 i2c: sun6i-p2wi: Prevent potential division by zero
    80876a07ca3b usb: gadget: f_ncm: Always set current gadget in ncm_bind()
    460284dfb10b tty: vcc: Add check for kstrdup() in vcc_probe()
    35b9435123ef HID: Add quirk for Dell Pro Wireless Keyboard and Mouse KM5221W
    b549acf99982 scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
    33906b36b15d atm: iphase: Do PCI error checks on own line
    54f4dde8fa0c PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields
    2527775616f3 ALSA: hda: Fix possible null-ptr-deref when assigning a stream
    953ed26a77c6 ARM: 9320/1: fix stack depot IRQ stack filter
    7467ca10a5ff jfs: fix array-index-out-of-bounds in diAlloc
    ecfb47f13b08 jfs: fix array-index-out-of-bounds in dbFindLeaf
    32bd8f1cbcf8 fs/jfs: Add validity check for db_maxag and db_agpref
    a81a56b4cbe3 fs/jfs: Add check for negative db_l2nbperpage
    e18d266fb3f1 RDMA/hfi1: Use FIELD_GET() to extract Link Width
    c9c133469730 crypto: pcrypt - Fix hungtask for PADATA_RESET
    ddd6e5266343 selftests/efivarfs: create-read: fix a resource leak
    437e0fa907ba drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL
    d50a56749e5a drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga
    c847379a5d00 drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
    1f24c286f4a4 drm/komeda: drop all currently held locks if deadlock happens
    5305ae0d4ad8 platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e
    3c4236f1b2a7 Bluetooth: Fix double free in hci_conn_cleanup
    3cf391e4174a wifi: ath10k: Don't touch the CE interrupt registers after power up
    252bde6b17b8 net: annotate data-races around sk->sk_dst_pending_confirm
    73909810ac27 net: annotate data-races around sk->sk_tx_queue_mapping
    bd653b07095a wifi: ath10k: fix clang-specific fortify warning
    32cc96dc5f4e wifi: ath9k: fix clang-specific fortify warnings
    efeae5f4972f wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
    770da15be321 wifi: mac80211_hwsim: fix clang-specific fortify warning
    cfe13e1486d4 x86/mm: Drop the 4 MB restriction on minimal NUMA node memory size
    91f7467ac96a clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware
    da667a3f8e23 clocksource/drivers/timer-imx-gpt: Fix potential memory leak
    788c0b3442ea perf/core: Bail out early if the request AUX area is out of bound
    dcd85e3c9293 locking/ww_mutex/test: Fix potential workqueue corruption
    ef379773e2e7 Linux 5.4.261
    3542ef5c3748 btrfs: use u64 for buffer sizes in the tree search ioctls
    7868e6151a6d Revert "mmc: core: Capture correct oemid-bits for eMMC cards"
    7be3aca8d73d fbdev: fsl-diu-fb: mark wr_reg_wa() static
    6c66d737b272 fbdev: imsttfb: fix a resource leak in probe
    b90c8dfd715f fbdev: imsttfb: Fix error path of imsttfb_probe()
    4a6a3f1b3840 spi: spi-zynq-qspi: add spi-mem to driver kconfig dependencies
    157333513d14 drm/syncobj: fix DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE
    21858a75dc78 netfilter: nat: fix ipv6 nat redirect with mapped and scoped addresses
    ae99c5e16a83 netfilter: nft_redir: use `struct nf_nat_range2` throughout and deduplicate eval call-backs
    11380557c236 netfilter: xt_recent: fix (increase) ipv6 literal buffer length
    cce1d4668191 r8169: respect userspace disabling IFF_MULTICAST
    e820e23338d1 tg3: power down device only on SYSTEM_POWER_OFF
    f8065cde49b2 net/smc: fix dangling sock under state SMC_APPFINCLOSEWAIT
    592f934b7a22 net: stmmac: xgmac: Enable support for multiple Flexible PPS outputs
    85513df59a3e Fix termination state for idr_for_each_entry_ul()
    56cddb5e657f net: r8169: Disable multicast filter for RTL8168H and RTL8107E
    e5a664ef4928 dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.
    3af0af2f98f3 dccp: Call security_inet_conn_request() after setting IPv4 addresses.
    afa49774d812 inet: shrink struct flowi_common
    2199260c42e6 tipc: Change nla_policy for bearer-related names to NLA_NUL_STRING
    cbdcdf42d15d llc: verify mac len before reading mac header
    50d122536661 Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()
    e3677bfcbbcb pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
    6e9b5295892e pwm: sti: Reduce number of allocations and drop usage of chip_data
    19e45307f71f pwm: sti: Avoid conditional gotos
    c4d5179e42b4 regmap: prevent noinc writes from clobbering cache
    d62d868b30b8 media: dvb-usb-v2: af9035: fix missing unlock
    7843a9bfbe13 media: s3c-camif: Avoid inappropriate kfree()
    b35fdade92c5 media: bttv: fix use after free error due to btv->timeout timer
    0bc0e36fccc2 pcmcia: ds: fix possible name leak in error path in pcmcia_device_add()
    1502edd4a014 pcmcia: ds: fix refcount leak in pcmcia_device_add()
    58d6fb6a933c pcmcia: cs: fix possible hung task and memory leak pccardd()
    37212eede637 rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call
    204beeb509d3 i3c: Fix potential refcount leak in i3c_master_register_new_i3c_devs
    247ed618f534 powerpc/pseries: fix potential memory leak in init_cpu_associativity()
    cee681d4b22b powerpc/imc-pmu: Use the correct spinlock initializer.
    dc5804b47b66 powerpc/xive: Fix endian conversion size
    b6cffe8dd7cd modpost: fix tee MODULE_DEVICE_TABLE built on big-endian host
    90ab33735e2e f2fs: fix to initialize map.m_pblk in f2fs_precache_extents()
    9f20b06214dc dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc()
    688326e2cf9e USB: usbip: fix stub_dev hub disconnect
    b003b7a7d42e tools: iio: iio_generic_buffer ensure alignment
    7a64d15db7aa tools: iio: iio_generic_buffer: Fix some integer type and calculation
    db6d5b9ff6e8 tools: iio: privatize globals and functions in iio_generic_buffer.c file
    55b90e4c406a misc: st_core: Do not call kfree_skb() under spin_lock_irqsave()
    ed9b2ad3b9ca dmaengine: ti: edma: handle irq_of_parse_and_map() errors
    64c47749fc75 usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency
    4050f13f71f2 tty: tty_jobctrl: fix pid memleak in disassociate_ctty()
    ba46faaa49c5 leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu'
    abfd682fc5f0 ledtrig-cpu: Limit to 8 CPUs
    f6c3b7a4ce51 leds: pwm: Don't disable the PWM when the LED should be off
    cd6f50115fab leds: pwm: convert to atomic PWM API
    9686f771c096 leds: pwm: simplify if condition
    87b1ee831ddf mfd: dln2: Fix double put in dln2_probe
    b843d2cd134b ASoC: ams-delta.c: use component after check
    4634c9cc726d ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails
    66888e6953f8 sh: bios: Revive earlyprintk support
    fdcbe9ce7bf3 RDMA/hfi1: Workaround truncation compilation error
    01698922f5d3 scsi: ufs: core: Leave space for '\0' in utf8 desc string
    3c61391a31a6 ext4: move 'ix' sanity check to corrent position
    454e6493bbda ARM: 9321/1: memset: cast the constant byte to unsigned char
    727203e6e7e7 hid: cp2112: Fix duplicate workqueue initialization
    48bb2931f24c HID: cp2112: Use irqchip template
    7b62cf90d0ea crypto: caam/jr - fix Chacha20 + Poly1305 self test failure
    090e89c71620 crypto: caam/qi2 - fix Chacha20 + Poly1305 self test failure
    40ba3fa21250 nd_btt: Make BTT lanes preemptible
    68655462f8be sched/rt: Provide migrate_disable/enable() inlines
    d14a373fe559 libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value
    f5d95a39683e hwrng: geode - fix accessing registers
    e4e4d4abb82b clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
    ce11e445d0ae firmware: ti_sci: Mark driver as non removable
    5d97cc0b491e firmware: ti_sci: Replace HTTP links with HTTPS ones
    cc1a1dcb411f soc: qcom: llcc: Handle a second device without data corruption
    813fdddde20f soc: qcom: Rename llcc-slice to llcc-qcom
    077010717b52 soc: qcom: llcc cleanup to get rid of sdm845 specific driver file
    3da50ee512e2 ARM: dts: qcom: mdm9615: populate vsdcc fixed regulator
    6b464d9414e3 arm64: dts: qcom: sdm845-mtp: fix WiFi configuration
    64d990086065 drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe()
    ddc42881f170 drm/radeon: possible buffer overflow
    4a29f0f7a1b7 drm/rockchip: vop: Fix call to crtc reset helper
    824f0f4f93c6 drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs
    eaf62ea6504f hwmon: (coretemp) Fix potentially truncated sysfs attribute name
    9fb0eed09e14 platform/x86: wmi: Fix opening of char device
    22117b77eecb platform/x86: wmi: remove unnecessary initializations
    1607ea8a8161 platform/x86: wmi: Fix probe failure when failing to register WMI devices
    d1461f0c9ca0 clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data
    e8ae4b49dd9c clk: mediatek: clk-mt7629: Add check for mtk_alloc_clk_data
    cfa68e0ac5dc clk: mediatek: clk-mt7629-eth: Add check for mtk_alloc_clk_data
    2705c5b97f50 clk: mediatek: clk-mt6797: Add check for mtk_alloc_clk_data
    fbe466f06d4e clk: mediatek: clk-mt6779: Add check for mtk_alloc_clk_data
    8ae911637b0b clk: npcm7xx: Fix incorrect kfree
    cbcf67b0bc5d clk: keystone: pll: fix a couple NULL vs IS_ERR() checks
    3d38bc4bab88 clk: imx: Select MXC_CLK for CLK_IMX8QXP
    ae98b5ef991a clk: qcom: gcc-sm8150: Fix gcc_sdcc2_apps_clk_src
    15f335494bb3 clk: qcom: gcc-sm8150: use ARRAY_SIZE instead of specifying num_parents
    141ccc127230 clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies
    dbf13624b2de regmap: debugfs: Fix a erroneous check after snprintf()
    af50165c1218 ipvlan: properly track tx_errors
    76304c749e05 net: add DEV_STATS_READ() helper
    4482b250c895 ipv6: avoid atomic fragment on GSO packets
    19d527337870 ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias()
    5105d46146f2 tcp: fix cookie_init_timestamp() overflows
    e4e819bdc8f3 tcp: Remove one extra ktime_get_ns() from cookie_init_timestamp
    7ab8aa73002c chtls: fix tp->rcv_tstamp initialization
    75bbf6e93462 r8169: fix rare issue with broken rx after link-down on RTL8125
    282342bc47c6 r8169: use tp_to_dev instead of open code
    3091ab943dfc thermal: core: prevent potential string overflow
    35854733ae67 can: dev: can_restart(): fix race condition between controller restart and netif_carrier_on()
    b53be254d30f can: dev: can_restart(): don't crash kernel if carrier is OK
    a29f012a27cf wifi: rtlwifi: fix EDCA limit set by BT coexistence
    bed72a332f02 tcp_metrics: do not create an entry from tcp_init_metrics()
    f3902c0e6f08 tcp_metrics: properly set tp->snd_ssthresh in tcp_init_metrics()
    b78f2b7774a0 tcp_metrics: add missing barriers on delete
    af0fe2c2ff4d wifi: mt76: mt7603: rework/fix rx pse hang check
    a2e99dbdc127 wifi: rtw88: debug: Fix the NULL vs IS_ERR() bug for debugfs_create_file()
    c9b929f7932b tcp: call tcp_try_undo_recovery when an RTOd TFO SYNACK is ACKed
    25eaef1d0d0e i40e: fix potential memory leaks in i40e_remove()
    09ce728c9e27 genirq/matrix: Exclude managed interrupts in irq_matrix_allocated()
    3718a48ef495 vfs: fix readahead(2) on block devices

(From OE-Core rev: a1e332f095eec1cb7a386a14c9ff4ce59594901a)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Bruce Ashfield
9716962e34 linux-yocto/5.4: update to v5.4.260
Updating  to the latest korg -stable release that comprises
the following commits:

    87e8e7a7aa1f Linux 5.4.260
    8b0ecf2167a0 tty: 8250: Add support for Intashield IS-100
    6dd5561b2385 tty: 8250: Add support for Brainboxes UP cards
    03145e0ff8ab tty: 8250: Add support for additional Brainboxes UC cards
    5a6471372f9b tty: 8250: Remove UC-257 and UC-431
    72f236b57f1c usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
    792a91fcd20d PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
    4b865e0d78a0 Revert "ARM: dts: Move am33xx and am43xx mmc nodes to sdhci-omap driver"
    4e53bab11f01 nvmet-tcp: Fix a possible UAF in queue intialization setup
    2c9415ec8ea9 nvmet-tcp: move send/recv error handling in the send/recv methods instead of call-sites
    784ef618b2cc remove the sx8 block driver
    a31f8222a74c ata: ahci: fix enum constants for gcc-13
    cc1afa62e231 net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
    7e429d1f3994 platform/mellanox: mlxbf-tmfifo: Fix a warning message
    5f4f58eac361 platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e
    88d1aa03eb16 scsi: mpt3sas: Fix in error path
    b1f62e3ef90c fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit()
    fb02de64791c ASoC: rt5650: fix the wrong result of key button
    b6c09ff5eada netfilter: nfnetlink_log: silence bogus compiler warning
    6c23b6d308af spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0
    788b308340ef fbdev: atyfb: only use ioremap_uc() on i386 and ia64
    848b9c688865 Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport
    a0bf183db438 dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
    39ae053abbad irqchip/stm32-exti: add missing DT IRQ flag translation
    fbcd05a0dbda Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table
    cda248f16924 x86: Fix .brk attribute in linker script
    01e6885b75e2 rpmsg: Fix possible refcount leak in rpmsg_register_device_override()
    cff56d7a9274 rpmsg: glink: Release driver_override
    3d1478598057 rpmsg: Fix calling device_lock() on non-initialized device
    e70898ae1a42 rpmsg: Fix kfree() of static memory on setting driver_override
    0df5d801359e rpmsg: Constify local variable in field store macro
    063444d66f90 driver: platform: Add helper for safer setting of driver_override
    83ecffd40c65 ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow
    66cfd4cf6ac8 ext4: avoid overlapping preallocations due to overflow
    1e0a5dec2638 ext4: add two helper functions extent_logical_end() and pa_logical_end()
    c2102ac1033f x86/mm: Fix RESERVE_BRK() for older binutils
    ced79d864bfd x86/mm: Simplify RESERVE_BRK()
    5fc242c11804 nfsd: lock_rename() needs both directories to live on the same fs
    e9a988cd4c8b f2fs: fix to do sanity check on inode type during garbage collection
    750de03de7e1 smbdirect: missing rc checks while waiting for rdma events
    5776aeee2a60 kobject: Fix slab-out-of-bounds in fill_kobj_path()
    0a45e0e5dd8d arm64: fix a concurrency issue in emulation_proc_handler()
    6ba2ffe3cb1c drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
    9d29933f36e1 x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
    1ed21b207ece i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
    f48670c3b089 clk: Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name
    511f3e9bbb0a perf/core: Fix potential NULL deref
    8de78231cba9 nvmem: imx: correct nregs for i.MX6UL
    0b2c3a8601cc nvmem: imx: correct nregs for i.MX6SLL
    6063678df7fa nvmem: imx: correct nregs for i.MX6ULL
    12337d3e8819 i2c: aspeed: Fix i2c bus hang in slave read
    e3d8ef87a9b1 i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
    5764f6e546a9 i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()
    a3b9bcedd7ad i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()
    07ec3d952a4a i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
    519ff2d9fecf iio: exynos-adc: request second interupt only when touchscreen mode is used
    2bf9fbd13635 gtp: fix fragmentation needed check with gso
    2ab1b7ad5046 gtp: uapi: fix GTPA_MAX
    54ba3b8267b0 tcp: fix wrong RTO timeout when received SACK reneging
    29cb3f81bc71 r8152: Cancel hw_phy_work if we have an error in probe
    6124d0b100bf r8152: Run the unload routine if we have errors during probe
    1d3cb4aa9388 r8152: Increase USB control msg timeout to 5000ms as per spec
    2f8da9511607 net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show()
    ec885679fa9a igc: Fix ambiguity in the ethtool advertising
    3b098edafefa neighbour: fix various data-races
    418ca6e63e06 igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
    00ef4a7de62c treewide: Spelling fix in comment
    e44e78ff44e5 r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1
    b9ba50fc18d7 r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1
    a27c6bfc5287 virtio-mmio: fix memory leak of vm_dev
    8d394fcb0398 virtio_balloon: Fix endless deflation and inflation on arm64
    be84e96426ed mcb-lpc: Reallocate memory region to avoid memory overlapping
    3235094d55de mcb: Return actual parsed size when reading chameleon table
    fbe17a8be10a selftests/ftrace: Add new test case which checks non unique symbol
    4d057ca86eaa mtd: rawnand: marvell: Ensure program page operations are successful
    86ea40e6ad22 Linux 5.4.259
    c01ac092d97c xfrm6: fix inet6_dev refcount underflow problem
    b849a38e187d Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name
    4d161e18b1c4 Bluetooth: hci_sock: fix slab oob read in create_monitor_event
    a0f0e43128f3 phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins
    d1618b922347 phy: mapphone-mdm6600: Fix runtime PM for remove
    4db06513a0ee phy: mapphone-mdm6600: Fix runtime disable on probe
    083ff5b50cf8 ASoC: pxa: fix a memory leak in probe()
    27a17a259005 gpio: vf610: set value before the direction to avoid a glitch
    664aad86e5e8 s390/pci: fix iommu bitmap allocation
    7252c8b98185 perf: Disallow mis-matched inherited group reads
    32279bbbd811 USB: serial: option: add Fibocom to DELL custom modem FM101R-GL
    1ff2a7fa0cc0 USB: serial: option: add entry for Sierra EM9191 with new firmware
    eb8f5e40cbe6 USB: serial: option: add Telit LE910C4-WWX 0x1035 composition
    b43a412aa1ef ACPI: irq: Fix incorrect return value in acpi_register_gsi()
    3189d2d58728 Revert "pinctrl: avoid unsafe code pattern in find_pinctrl()"
    690eb3772f97 mmc: core: Capture correct oemid-bits for eMMC cards
    894b678d865b mmc: core: sdio: hold retuning if sdio in 1-bit mode
    37ae7c493a07 mtd: physmap-core: Restore map_rom fallback
    de28fa53318e mtd: spinand: micron: correct bitmask for ecc status
    bd68f5068401 mtd: rawnand: qcom: Unmap the right resource upon probe failure
    a787e07755b6 Bluetooth: hci_event: Fix using memcmp when comparing keys
    897d6aee8fb4 HID: multitouch: Add required quirk for Synaptics 0xcd7e device
    9cae05233b44 btrfs: fix some -Wmaybe-uninitialized warnings in ioctl.c
    693ecef54334 drm: panel-orientation-quirks: Add quirk for One Mix 2S
    4030effab831 sky2: Make sure there is at least one frag_addr available
    340bb4b71661 regulator/core: Revert "fix kobject release warning and memory leak in regulator_register()"
    d7604e819aa6 wifi: cfg80211: avoid leaking stack data into trace
    139234011fde wifi: mac80211: allow transmitting EAPOL frames with tainted key
    b48595f5b1c6 Bluetooth: hci_core: Fix build warnings
    16e36cde2738 Bluetooth: Avoid redundant authentication
    fa83d852e987 HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event
    981dfec995a6 tracing: relax trace_event_eval_update() execution with cond_resched()
    b5d9f34f38ba ata: libata-eh: Fix compilation warning in ata_eh_link_report()
    392f597eadd7 gpio: timberdale: Fix potential deadlock on &tgpio->lock
    91ae08dc3033 overlayfs: set ctime when setting mtime and atime
    01a4e9bc63b7 i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
    97cb55f41e2a btrfs: initialize start_slot in btrfs_log_prealloc_extents
    a055d9d4dd78 btrfs: return -EUCLEAN for delayed tree ref with a ref count not equals to 1
    d65dbb2aa4f3 ARM: dts: ti: omap: Fix noisy serial with overrun-throttle-ms for mapphone
    611c991b9e5f ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CBA
    b2d0649c8edf ACPI: resource: Skip IRQ override on ASUS ExpertBook B1502CBA
    8c0982fc4b72 ACPI: resource: Skip IRQ override on Asus Expertbook B2402CBA
    0818716a9012 ACPI: resource: Add Asus ExpertBook B2502 to Asus quirks
    c6f7b3358640 ACPI: resource: Skip IRQ override on Asus Vivobook S5602ZA
    b1f5f4720f52 ACPI: resource: Add ASUS model S5402ZA to quirks
    fdcd669371da ACPI: resource: Skip IRQ override on Asus Vivobook K3402ZA/K3502ZA
    cd202a9f88f1 ACPI: resources: Add DMI-based legacy IRQ override quirk
    26b2bc9bdcde ACPI: Drop acpi_dev_irqresource_disabled()
    583913b1a667 resource: Add irqresource_disabled()
    d6878d39b675 net: pktgen: Fix interface flags printing
    cee9ea14c8c7 netfilter: nft_set_rbtree: .deactivate fails if element has expired
    863acae0b83a neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section
    f34916502d91 net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve
    b1ad377bbaf7 i40e: prevent crash on probe if hw registers have invalid values
    c813d17660f8 net: usb: smsc95xx: Fix an error code in smsc95xx_reset()
    47419f2aefb3 ipv4: fib: annotate races around nh->nh_saddr_genid and nh->nh_saddr
    00a251ea4507 tun: prevent negative ifindex
    8710dbe09e46 tcp: tsq: relax tcp_small_queue_check() when rtx queue contains a single skb
    1ae2c7d44e7e tcp: fix excessive TLP and RACK timeouts from HZ rounding
    eb1a33195a30 net: rfkill: gpio: prevent value glitch during probe
    cd44e14573c4 net: ipv6: fix return value check in esp_remove_trailer
    03b88b7d2a13 net: ipv4: fix return value check in esp_remove_trailer
    0cb7b894e47b xfrm: interface: use DEV_STATS_INC()
    bcacdf4debe5 xfrm: fix a data-race in xfrm_gen_index()
    639e979a7d15 qed: fix LL2 RX buffer allocation
    1cb76fec3ed6 netfilter: nft_payload: fix wrong mac header matching
    6b2875b52746 KVM: x86: Mask LVTPC when handling a PMI
    1d434d83136e regmap: fix NULL deref on lookup
    76050b0cc5a7 nfc: nci: fix possible NULL pointer dereference in send_acknowledge()
    80ce32ab9bee ice: fix over-shifted variable
    ec8f0d0fe6a7 Bluetooth: avoid memcmp() out of bounds warning
    1a00e3544b28 Bluetooth: hci_event: Fix coding style
    84598a339bf9 Bluetooth: vhci: Fix race when opening vhci device
    1769ac55dbf3 Bluetooth: Fix a refcnt underflow problem for hci_conn
    97ce8eca07c9 Bluetooth: Reject connection with the device which has same BD_ADDR
    6ce347833612 Bluetooth: hci_event: Ignore NULL link key
    6ad3e9fd3632 usb: hub: Guard against accesses to uninitialized BOS descriptors
    57e83c2445cd Documentation: sysctl: align cells in second content column
    947cd2fba15e dev_forward_skb: do not scrub skb mark within the same name space
    65d34cfd4e34 ravb: Fix use-after-free issue in ravb_tx_timeout_work()
    de6e271338c1 powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()
    85ae11da8504 powerpc/8xx: Fix pte_access_permitted() for PAGE_NONE
    077fdae908e2 dmaengine: mediatek: Fix deadlock caused by synchronize_irq()
    6ea15d9f7ac2 x86/cpu: Fix AMD erratum #1485 on Zen4-based CPUs
    e7ca00f35d8a usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call
    1e4414c3870e usb: gadget: udc-xilinx: replace memcpy with memcpy_toio
    2a433d325563 pinctrl: avoid unsafe code pattern in find_pinctrl()
    d5b11bd89377 cgroup: Remove duplicates in cgroup v1 tasks file
    1e59ebed9cf3 Input: xpad - add PXN V900 support
    8664fa7fbbbf Input: psmouse - fix fast_reconnect function for PS/2 mode
    5aa514100aaf Input: powermate - fix use-after-free in powermate_config_complete
    3cdce751b026 ceph: fix incorrect revoked caps assert in ceph_fill_file_size()
    92cd1635c685 libceph: use kernel_connect()
    5704225cdd87 mcb: remove is_added flag from mcb_device struct
    2bf6c93e17c4 iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
    84af249e48c5 iio: pressure: dps310: Adjust Timeout Settings
    00cd9d9c12f4 iio: pressure: bmp280: Fix NULL pointer exception
    f4c11b2ea0f9 usb: musb: Modify the "HWVers" register address
    fc1ecea726ec usb: musb: Get the musb_qh poniter after musb_giveback
    c0fb0419c1ad usb: dwc3: Soft reset phy on probe for host
    7efac5b4c209 net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read
    57942b0763cf usb: xhci: xhci-ring: Use sysdev for mapping bounce buffer
    e39710084664 dmaengine: stm32-mdma: abort resume if no ongoing transfer
    3345799c4f2e workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()
    95733ea130e3 nfc: nci: assert requested protocol is valid
    7adcf014bda1 net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()
    22ca282ea00b ixgbe: fix crash with empty VF macvlan list
    0cc6c070d926 drm/vmwgfx: fix typo of sizeof argument
    80a3c0068471 xen-netback: use default TX queue size for vifs
    332587dc7fed mlxsw: fix mlxsw_sp2_nve_vxlan_learning_set() return type
    85c2857ef900 ieee802154: ca8210: Fix a potential UAF in ca8210_probe
    daff72af3ff1 ravb: Fix up dma_free_coherent() call in ravb_remove()
    d3d2aecc1ffe drm/msm/dsi: skip the wait for video mode done if not applicable
    a0c24f802da7 drm: etvnaviv: fix bad backport leading to warning
    907a380eb3a1 net: prevent address rewrite in kernel_bind()
    061a18239ced quota: Fix slow quotaoff
    cd0e2bf7fb22 HID: logitech-hidpp: Fix kernel crash on receiver USB disconnect
    8e39b5fb834f pwm: hibvt: Explicitly set .polarity in .get_state()
    c4eff809d622 lib/test_meminit: fix off-by-one error in test_pages()
    ffdd8f56a46b RDMA/cxgb4: Check skb value for failure to allocate

(From OE-Core rev: c25c484eb696b8859c7183f1b26a30a1172d56ac)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Bruce Ashfield
fd1ba91818 linux-yocto/5.4: update to v5.4.258
Updating  to the latest korg -stable release that comprises
the following commits:

    02f78c59a0ed Linux 5.4.258
    f70c285cf02c xen/events: replace evtchn_rwlock with RCU
    e2614ab16a7e ima: rework CONFIG_IMA dependency block
    b5c3bc4b8104 NFS: Fix a race in __nfs_list_for_each_server()
    f0ea421fa2f7 parisc: Restore __ldcw_align for PA-RISC 2.0 processors
    14e5d94d5c86 RDMA/mlx5: Fix NULL string error
    6e26812e289b RDMA/siw: Fix connection failure handling
    8ab1fb16dce0 RDMA/uverbs: Fix typo of sizeof argument
    26d48f7090b8 RDMA/cma: Fix truncation compilation warning in make_cma_ports
    f102dd8a1795 gpio: pxa: disable pinctrl calls for MMP_GPIO
    e38aceeadb4b gpio: aspeed: fix the GPIO number passed to pinctrl_gpio_set_config()
    8584ee20a56c IB/mlx4: Fix the size of a buffer in add_port_entries()
    35b689ee4b57 RDMA/core: Require admin capabilities to set system parameters
    1047ca5bae20 cpupower: add Makefile dependencies for install targets
    3c2f536c3d32 sctp: update hb timer immediately after users change hb_interval
    caf0c61f14e7 sctp: update transport state when processing a dupcook packet
    14fc22c92937 tcp: fix delayed ACKs for MSS boundary condition
    2791d64e6607 tcp: fix quick-ack counting to count actual ACKs of new data
    7fbce1e46b41 net: stmmac: dwmac-stm32: fix resume on STM32 MCU
    f110aa377ddc netfilter: handle the connecting collision properly in nf_conntrack_proto_sctp
    191d87a19cf1 net: nfc: llcp: Add lock when modifying device list
    310f1c92f65a net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg
    899205521005 net: dsa: mv88e6xxx: Avoid EEPROM timeout when EEPROM is absent
    1fc793d68d50 ipv4, ipv6: Fix handling of transhdrlen in __ip{,6}_append_data()
    95eabb075a59 net: fix possible store tearing in neigh_periodic_work()
    10a301c83a3d modpost: add missing else to the "of" check
    5e1c1bf53e5f NFSv4: Fix a nfs4_state_manager() race
    f90821f66727 NFS: Add a helper nfs_client_for_each_server()
    e2d4fc53e9f7 NFS4: Trace state recovery operation
    c87f66c43c1b scsi: target: core: Fix deadlock due to recursive locking
    8a1fa738b491 ima: Finish deprecation of IMA_TRUSTED_KEYRING Kconfig
    442e50393a29 regmap: rbtree: Fix wrong register marked as in-cache when creating new node
    52008a5e22ac wifi: mt76: mt76x02: fix MT76x0 external LNA gain handling
    31b27776905a drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()
    b8e260654a29 wifi: mwifiex: Fix oob check condition in mwifiex_process_rx_packet
    1b67be400a96 wifi: iwlwifi: dbg_ini: fix structure packing
    c6d358387632 ubi: Refuse attaching if mtd's erasesize is 0
    b4ec10b962f7 net: prevent rewrite of msg_name in sock_sendmsg()
    53b700b41a06 net: replace calls to sock->ops->connect() with kernel_connect()
    3c4bfa7a56c8 wifi: mwifiex: Fix tlv_buf_left calculation
    2e608cede0ae qed/red_ll2: Fix undefined behavior bug in struct qed_ll2_info
    810248a12999 scsi: zfcp: Fix a double put in zfcp_port_enqueue()
    e60272ab021c Revert "PCI: qcom: Disable write access to read only registers for IP v2.3.3"
    6e37de4a1407 rbd: take header_rwsem in rbd_dev_refresh() only when updating
    bc2a3044015f rbd: decouple parent info read-in from updating rbd_dev
    2e0114edeb47 rbd: decouple header read-in from updating rbd_dev->header
    32a59639c551 rbd: move rbd_dev_refresh() definition
    ff10b1fad581 fs: binfmt_elf_efpic: fix personality for ELF-FDPIC
    43e5dc1ee2ea ata: libata-sata: increase PMP SRST timeout to 10s
    ac1aebd4e3b8 ata: libata-core: Do not register PM operations for SAS ports
    9313aab5f649 ata: libata-core: Fix port and device removal
    9207666f166c ata: libata-core: Fix ata_port_request_pm() locking
    d9483f5aecf4 net: thunderbolt: Fix TCPv6 GSO checksum calculation
    47062af85961 btrfs: properly report 0 avail for very full file systems
    cf221a7880ea ring-buffer: Update "shortest_full" in polling
    ec7b2e7b365c i2c: i801: unregister tco_pdev in i801_probe() error path
    a4ecd8562c0e ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES
    ec1df5d37d59 ALSA: hda: Disable power save for solving pop issue on Lenovo ThinkCentre M70q
    193b5a1c6c67 nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()
    bf3c728e3692 serial: 8250_port: Check IRQ data before use
    76ffbd900b6a Smack:- Use overlay inode label in smack_inode_copy_up()
    957a9916db5b smack: Retrieve transmuting information in smack_inode_getsecurity()
    c9ce9bab2301 smack: Record transmuting in smk_transmuted
    d037d8964fb8 i40e: fix return of uninitialized aq_ret in i40e_set_vsi_promisc
    2d78e2d3e31f i40e: always propagate error value in i40e_set_vsi_promisc()
    8ed4b5d710b0 i40e: improve locking of mac_filter_hash
    30055e020ab2 watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running
    c54a392fc79e watchdog: iTCO_wdt: No need to stop the timer in probe
    d68c61092c3d nvme-pci: do not set the NUMA node of device if it has none
    283f24df8303 fbdev/sh7760fb: Depend on FB=y
    ee1f5c63e919 ncsi: Propagate carrier gain/loss events to the NCSI controller
    b42eac146247 powerpc/watchpoints: Annotate atomic context in more places
    723904ce853e bpf: Clarify error expectations from bpf_clone_redirect
    db4afbc6c1a1 spi: nxp-fspi: reset the FLSHxCR1 registers
    3502dd803138 ata: libata-eh: do not clear ATA_PFLAG_EH_PENDING in ata_eh_reset()
    05264d6551e1 ring-buffer: Avoid softlockup in ring_buffer_resize()
    1d28224d49f3 selftests/ftrace: Correctly enable event in instance-event.tc
    ded3551163fc parisc: irq: Make irq_stack_union static to avoid sparse warning
    a721e5788aca parisc: drivers: Fix sparse warning
    2569e0ceff8a parisc: iosapic.c: Fix sparse warnings
    f1a0dd9243f0 parisc: sba: Fix compile warning wrt list of SBA devices
    6db9cdfdc3c5 gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
    4a62d23eba66 xtensa: boot/lib: fix function prototypes
    e11fa78a3722 xtensa: boot: don't add include-dirs
    5ed83a0a3953 xtensa: iss/network: make functions static
    b821e6a8b2f5 xtensa: add default definition for XCHAL_HAVE_DIV32
    49dc6fcd4b6a bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up
    841733189b2e ARM: dts: ti: omap: motorola-mapphone: Fix abe_clkctrl warning on boot
    3468fa39d898 clk: tegra: fix error return case for recalc_rate
    6938a6cbe651 MIPS: Alchemy: only build mmc support helpers if au1xmmc is enabled
    5b0d13e2d9f6 ata: libata: disallow dev-initiated LPM transitions to unsupported states
    617a89ff55e3 drm/amd/display: prevent potential division by zero errors
    07b63a3dcfef drm/amd/display: Fix LFC multiplier changing erratically
    11e3f781f6e3 drm/amd/display: Reinstate LFC optimization
    a4628a5b98e4 scsi: qla2xxx: Fix deletion race condition
    0a51c838c58f scsi: qla2xxx: Fix update_fcport for current_topology
    ecdf4c658b6e Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
    0926a2b7cb60 i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()
    e09db461f258 gpio: tb10x: Fix an error handling path in tb10x_gpio_probe()
    02a233986c9e netfilter: ipset: Fix race between IPSET_CMD_CREATE and IPSET_CMD_SWAP
    812da2a08dc5 net: rds: Fix possible NULL-pointer dereference
    c5f6478686bb team: fix null-ptr-deref when team device type is changed
    ad8d39c7b437 net: bridge: use DEV_STATS_INC()
    121a7c474ce0 net: hns3: add 5ms delay before clear firmware reset irq source
    a6f4d582e25d dccp: fix dccp_v4_err()/dccp_v6_err() again
    16b88d7a1436 powerpc/perf/hv-24x7: Update domain value check
    810fd23d9715 ipv4: fix null-deref in ipv4_link_failure
    8f228c326d68 i40e: Fix VF VLAN offloading when port VLAN is configured
    8b835db2793a i40e: Fix warning message and call stack during rmmod i40e driver
    9cbec71a5721 i40e: Remove scheduling while atomic possibility
    0988fc499f67 i40e: Fix for persistent lldp support
    09475d647670 ASoC: imx-audmix: Fix return error with devm_clk_get()
    ca1d4e3c4dba selftests: tls: swap the TX and RX sockets in some tests
    b9eb384fd4fd selftests/tls: Add {} to avoid static checker warning
    40e34ea01748 bpf: Avoid deadlock when using queue and stack maps from NMI
    eec981349b03 netfilter: nf_tables: disallow element removal on anonymous sets
    d2a6844be5bd ASoC: meson: spdifin: start hw on dai probe
    0c908e159588 ext4: do not let fstrim block system suspend
    4db34feaf297 ext4: move setting of trimmed bit into ext4_try_to_trim_range()
    767a50bef2aa ext4: replace the traditional ternary conditional operator with with max()/min()
    2fd502f53bf4 ext4: mark group as trimmed only if it was fully scanned
    635901bdbd7e ext4: change s_last_trim_minblks type to unsigned long
    2d874151584d ext4: scope ret locally in ext4_try_to_trim_range()
    c71cb46affe9 ext4: add new helper interface ext4_try_to_trim_range()
    b0dcbd4bb957 ext4: remove the 'group' parameter of ext4_trim_extent
    bf0660756510 ata: libahci: clear pending interrupt status
    e6807c873d87 tracing: Increase trace array ref count on enable and filter files
    7d3f6612e90b SUNRPC: Mark the cred for revalidation if the server rejects it
    321c75b01cc8 NFS/pNFS: Report EINVAL errors from connect() to the server

(From OE-Core rev: 013883aef0e9bfc6817ae1e5c5d1f1abafdf4cd0)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Tim Orling
2b4a973db3 vim: upgrade 9.0.2068 -> 9.0.2130
https://github.com/vim/vim/compare/v9.0.2068...v9.0.2130

CVE: CVE-2023-48231
CVE: CVE-2023-48232
CVE: CVE-2023-48233
CVE: CVE-2023-48234
CVE: CVE-2023-48235
CVE: CVE-2023-48236
CVE: CVE-2023-48237

(From OE-Core rev: 6baa307e0445bef8993b50cf45eeeeb1c2c3529d)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 5978d565a9e700485fc563dfe2e3c0045dd74b59)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Lee Chee Yang
45845f8056 qemu: ignore CVE-2021-20295 CVE-2023-2680
Ignore RHEL specific CVE-2021-20295 CVE-2023-2680.

(From OE-Core rev: 2c0822d9e7b8e7d013ef89c7e82e19fff39228a9)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Lee Chee Yang
d0120e8aec epiphany: fix CVE-2022-29536
(From OE-Core rev: 507b9de9df375721cd307163fe06c3ee567385e8)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Vivek Kumbhar
97b8007eff libsndfile: fix CVE-2022-33065 Signed integer overflow in src/mat4.c
(From OE-Core rev: f9cc32ed3c67c8fe60debbc23b579e120038b2e9)

Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Ashish Sharma
59f99476d8 mdadm: Backport fix for CVE-2023-28938
Upstream-Status: Backport from [https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/patch/?id=7d374a1869d3a84971d027a7f4233878c8f25a62]
CVE: CVE-2023-28938
(From OE-Core rev: 8cf02e6b60e2916b9e4832590257d5d184258e9c)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
poojitha adireddy
7f8394e2b1 binutils: Mark CVE-2022-47696 as patched
CVE-2022-47696 and CVE-2023-25588 are representing similar kind
of vulnerability.

Reference:
https://ubuntu.com/security/CVE-2022-47696
https://sourceware.org/bugzilla/show_bug.cgi?id=29677

(From OE-Core rev: a2af1a2b05e3046995f48e4d823c9dfc97b95529)

Signed-off-by: poojitha adireddy <pooadire@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
poojitha adireddy
24fe566155 binutils 2.34: Fix CVE-2021-46174
Upstream Repository: https://sourceware.org/git/binutils-gdb.git

Bug Details: https://nvd.nist.gov/vuln/detail/CVE-2021-46174
Type: Security Fix
CVE: CVE-2021-46174
Score: 7.5
Patch: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cad4d6b91e97

(From OE-Core rev: 94f2468de191f8c1dd236efb91f3094a76ddffc9)

Signed-off-by: poojitha adireddy <pooadire@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-08 11:45:59 -10:00
Steve Sakoman
b8f1972b84 vim: use upstream generated .po files
A previous commit attempted to fix reproducibility errors by forcing
regeneration of .po files. Unfortunately this triggered a different
type of reproducibility issue.

Work around this by adjusting the timestamps of the troublesome .po
files so they are not regenerated and we use the shipped upstream
versions of the files.

The shipped version of ru.cp1251.po doesn't seem to have been created
with the vim tooling and specifies CP1251 instead of cp1251, fix that.

(From OE-Core rev: 0764da7e3f1d71eb390e5eb8a9aa1323c24d1c19)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:19 -10:00
Archana Polampalli
75bc08971b vim: Upgrade 9.0.2048 -> 9.0.2068
This includes CVE fix for CVE-2023-46246.
9198c1f2b (tag: v9.0.2068) patch 9.0.2068: [security] overflow in :history

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-46246

(From OE-Core rev: 2854c285ebf615ea71ecfc6fc559419e72005c5e)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:19 -10:00
Etienne Cordonnier
c86e8fe287 vim: update obsolete comment
vim 8.3 has been out for a long time, so this comment is obsolete.
However we still need UPSTREAM_VERSION_UNKNOWN, since we ignore
the last digit of the upstream version number.

Test result:
$ devtool check-upgrade-status vim
  ...
  INFO: vim                       9.0.1592        UNKNOWN         Tom Rini <trini@konsulko.com> c0370529c027abc5b1698d53fcfb8c02a0c515da

(From OE-Core rev: 65f5de85c3f488136d1ec2b1f7fe8d8426d6c5b3)

(From OE-Core rev: be68cf4c3e4218cc360ce7a645c92b631224ce94)

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 868a19357841470eb55fb7f1c4ab1af09dea99ed)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:19 -10:00
Richard Purdie
3afde32bfa vim: Improve locale handling
When making checkouts from git, the timestamps can vary and occasionally two files
can end up with the same stamp. This triggers make to regenerate ru.cp1251.po from
ru.po for example. If it isn't regenerated, the output isn't quite the same leading
to reproducibility issues (CP1251 vs cp1251).

Since we added all locales to buildtools tarball now, we can drop the locale
restrictions too. We need to generate a native binary for the sjis conversion
tool so also tweak that.

(From OE-Core rev: 14982eabcdb96c2f7ef9e28d6c0daedb53aa96c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:19 -10:00
Vijay Anusuri
0efbcefe73 tiff: backport Debian patch to fix CVE-2022-40090
import patch from ubuntu to fix
 CVE-2022-40090

Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/tiff/tree/debian/patches?h=ubuntu/focal-security
Upstream commit
c7caec9a4d]

(From OE-Core rev: 999af9858676a0f5112ef3a9d9156be349f90cb4)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:19 -10:00
Hitendra Prajapati
c64835823a grub: fix CVE-2023-4692 & CVE-2023-4693
Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=43651027d24e62a7a463254165e1e46e42aecdea && https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=0ed2458cc4eff6d9a9199527e2a0b6d445802f94

(From OE-Core rev: f461056d88db0eae5573a0c0ad23c408cff80bd8)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:19 -10:00
Vijay Anusuri
716693cccc avahi: backport Debian patches to fix multiple CVE's
import patches from ubuntu to fix
 CVE-2023-1981
 CVE-2023-38469
 CVE-2023-38470
 CVE-2023-38471
 CVE-2023-38472
 CVE-2023-38473

Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches?h=ubuntu/focal-security
Upstream commit
a2696da2f2
&
a337a1ba7d
&
c6cab87df2
&
94cb648911
&
20dec84b24
&
894f085f40
&
b675f70739
&
b024ae5749
&
b448c9f771]

(From OE-Core rev: 4771e335cd4d95e734d7f07a718319f4543ce2f1)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:19 -10:00
Vijay Anusuri
8cabed090e bind: Backport fix for CVE-2023-3341
Upstream-Status: Backport [c4fac5ca98]

(From OE-Core rev: e0fbe202981c9074547881dbeb7eb58670808fc3)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:19 -10:00
Lee Chee Yang
be8b0f8178 curl: fix CVE-2023-28321 CVE-2023-28322
import patch from ubuntu curl_7.68.0-1ubuntu2.20.

minor change to CVE-2023-28321.patch tests/data/test1397 part
so the patch can be apply.

(From OE-Core rev: 5cc1f487928df04c58709dd88ef6c17c171da7a5)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:18 -10:00
Vijay Anusuri
7c678246f6 shadow: backport patch to fix CVE-2023-29383
The fix of CVE-2023-29383.patch contains a bug that it rejects all
characters that are not control ones, so backup another patch named
"0001-Overhaul-valid_field.patch" from upstream to fix it.

(From OE-Core rev: ab48ab23de6f6bb1f05689c97724140d4bef8faa)

Upstream-Status: Backport
[e5905c4b84
&
2eaea70111]

(From OE-Core rev: a53d446c289f07854e286479cd7e4843ddd0ee8c)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:18 -10:00
Lee Chee Yang
d3f1ae99a7 python3-setuptools: fix CVE-2022-40897
import patch from ubuntu setuptools_45.2.0-1ubuntu0.1 .

(From OE-Core rev: a939696d7c70c42e404ec30a9d75e5ea4f742c78)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:18 -10:00
Lee Chee Yang
d843ae7d5d wayland: fix CVE-2021-3782
take CVE-2021-3782.patch from OE-core rev 09b8ff8d2361b2db001bc963f481db294ccf2170.

(From OE-Core rev: 9c3f494bf54c4d4b7ec776ab18d900bf9fbd042a)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:18 -10:00
Vijay Anusuri
63909c1cc6 libx11: Fix for CVE-2023-43785 CVE-2023-43786 and CVE-2023-43787
import patches from ubuntu to fix
 CVE-2023-43785
 CVE-2023-43786
 CVE-2023-43787

Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libx11/tree/debian/patches?h=ubuntu/focal-security
Upstream commit
6858d468d9
&
204c3393c4
&
73a37d5f2f
&
b4031fc023
&
7916869d16]

Reference: https://launchpad.net/ubuntu/+source/libx11/2:1.6.9-2ubuntu1.6

(From OE-Core rev: 0ebeabda9096b44ead2293356c5947367c6042fe)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-01 04:14:18 -10:00
Steve Sakoman
4553984904 selftest: skip virgl test on all fedora
This test will fail any time the host has libdrm > 2.4.107

(From OE-Core rev: ff7dbcc0206203e2ece68ca91a37050a4bc822a2)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Steve Sakoman
1149fde2f4 lz4: Update sstate/equiv versions to clean cache
There are cached reproducibility issues on the autobuilder due to CFLAGS
issues, flush the bad data out the system by bumping the versions.

(From OE-Core rev: f398c84405913bd8038c007f43f991f54d136571)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Mikko Rapeli
cdc9522ede lz4: use CFLAGS from bitbake
Currently lz4 uses it's own defaults which include O3 optimization.
Switch from O3 to bitbake default O2 reduces binary package size
from 467056 to 331888 bytes. Enables also building with Os if needed.

(From OE-Core rev: af571c0841265dfa4bd87546080e499336a37fcc)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit abaaf8c6bcd368728d298937a9406eb2aebc7a7d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Naveen Saini
800272477a resolvconf: Fix fetch error
Branch 'master' renamed to 'unstable', which causing following failure.

Error:
Fetcher failure: Unable to find revision cb19bbfbe7e52174332f68bf2f295b39d119fad3 in branch master even from upstream

Switch to 'unstanble' branch.

(From OE-Core rev: d4b96dc1e457b4e68c5bad685ffcfd2f250162e7)

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Naveen Saini
6fd1064e82 assimp: Explicitly use nobranch=1 in SRC_URI
Branch 'assimp_5.0_release' is not present in repo.

Error:
assimp-5.0.1-r0 do_fetch: Fetcher failure: Unable to find revision 8f0c6b04b2257a520aaab38421b2e090204b69df in branch assimp_5.0_release even from upstream

Set nobranch=1, to fetch from v5.0.1 tag.

(From OE-Core rev: 4bd92b9621909b8b528b648529baaaa48bc1c424)

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Ross Burton
76fb1012eb cve-check: don't warn if a patch is remote
We don't make do_cve_check depend on do_unpack because that would be a
waste of time 99% of the time.  The compromise here is that we can't
scan remote patches for issues, but this isn't a problem so downgrade
the warning to a note.

Also move the check for CVEs in the filename before the local file check
so that even with remote patches, we still check for CVE references in
the name.

(From OE-Core rev: 32a19dfbaac38cd4864281a1131ac65e1216318f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 0251cad677579f5b4dcc25fa2f8552c6040ac2cf)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Ross Burton
1b7c8a3e7e cve-check: slightly more verbose warning when adding the same package twice
Occasionally the cve-check tool will warn that it is adding the same
package twice.  Knowing what this package is might be the first step
towards understanding where this message comes from.

(From OE-Core rev: e3574760ee59c1ca7d2698f09ddd37ee568f04f3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c1179faec8583a8b7df192cf1cbf221f0e3001fc)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Ross Burton
38c0d384bd cve-check: sort the package list in the JSON report
The JSON report generated by the cve-check class is basically a huge
list of packages.  This list of packages is, however, unsorted.

To make things easier for people comparing the JSON, or more
specifically for git when archiving the JSON over time in a git
repository, we can sort the list by package name.

(From OE-Core rev: 5a509bc6f26247cc7561189d582c91816042fd91)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e9861be0e5020830c2ecc24fd091f4f5b05da036)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Vijay Anusuri
01cabaea04 xserver-xorg: Fix for CVE-2023-5367 and CVE-2023-5380
Upstream-Status: Backport
[541ab2ecd4
&
564ccf2ce9]

(From OE-Core rev: 41b87e7493f7b50ba0ddad941d37ef4a24a749d8)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Steve Sakoman
72c7bacfd3 Revert "qemu: Backport fix for CVE-2023-0330"
This reverts commit 45ce9885351a2344737170e6e810dc67ab3e7ea9.

Unfortunately this backport results in qemuarmv5 failing to boot with
a qemu lsi hw error.

[YOCTO #15274]

See discussion: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15274

(From OE-Core rev: 14aa11aecf503cef08e43c90cf0bd574721ca965)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Ashish Sharma
8a8d40420f zlib: Backport fix for CVE-2023-45853
Upstream-Status: Backport from [73331a6a04]

(From OE-Core rev: bbe5e13c2ff981d7defd14f9e2d91ebbe107bb4b)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Soumya Sambu
a405e12beb libwebp: Fix CVE-2023-4863
Heap buffer overflow in WebP in Google Chrome prior to 116.0.5845.187
allowed a remote attacker to perform an out of bounds memory write via
a crafted HTML page.

Removed CVE-2023-5129.patch as CVE-2023-5129 is duplicate of CVE-2023-4863.

CVE: CVE-2023-4863

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-4863
https://security-tracker.debian.org/tracker/CVE-2023-4863
https://bugzilla.redhat.com/show_bug.cgi?id=2238431#c12

(From OE-Core rev: b69bef1169cb33c153384be81845eaf903dc1570)

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Peter Marko
be04eefcaf glibc: ignore CVE-2023-4527
This vulnerability was introduced in 2.36, so 2.31 is not vulnerable.

(From OE-Core rev: 3471922461627c0f0487feb09cfdc4cfeeb3f3ca)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Vijay Anusuri
77214fc5d4 tiff: backport Debian patch to fix CVE-2023-41175
Upstream-Status: Backport [import from debian security.debian.org/debian-security/pool/updates/main/t/tiff/tiff_4.1.0+git191117-2~deb10u8.debian.tar.xz
Upstream commit 6e2dac5f90]

Reference: https://security-tracker.debian.org/tracker/CVE-2023-41175

(From OE-Core rev: ef66190f834fde453af431cc2aadebac82b7e5b5)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Hitendra Prajapati
cd9a699320 tiff: Security fix for CVE-2023-40745
Upstream-Status: Backport from 4fc16f649f

(From OE-Core rev: d282b85cf69ecfbce12224428c713cd0dc639ced)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Vijay Anusuri
5e9e6627ac tiff: CVE patch correction for CVE-2023-3576
- The commit [881a070194]
fixes CVE-2023-3576
- Hence, renamed the CVE-2023-3618-1.patch to CVE-2023-3576.patch
- Reference: https://security-tracker.debian.org/tracker/CVE-2023-3576
             https://security-tracker.debian.org/tracker/CVE-2023-3618

(From OE-Core rev: 56088368bdd22a939b813c7aefd5ba475c6d4021)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Lee Chee Yang
facedadb5c kexec-tools: Ignore Fedora/RedHat specific CVE-2021-20269
(From OE-Core rev: d34567be6e87afdec55973f8f75be8d44b4acd1b)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-17 06:00:32 -10:00
Samantha Jalabert
e66a386604 bitbake: Fix disk space monitoring on cephfs
Error occured while running bitbake on cephfs:

WARNING: The free inode of path is running low (-0.001K left)
ERROR: Immediately halt since the disk space monitor action is "HALT"!

(Bitbake rev: 3c7b210e9599058a48d0c38ce8034b94e2d0f781)

Signed-off-by: Samantha Jalabert <samantha.jalabert@syslinbit.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-11-09 04:38:54 -10:00
Steve Sakoman
aeac103466 build-appliance-image: Update to dunfell head revision
(From OE-Core rev: 0dbf3a15321b8033ff8ed86c6aa261fdb9c3d5bb)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:24:08 -10:00
Steve Sakoman
9a045bde41 poky.conf: bump version for 3.1.29
(From meta-yocto rev: ca9b97e06e2632b2a04002eb9bb06cd6a2c656c6)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:21:20 -10:00
Steve Sakoman
6ebec3f39b documentation: update for 3.1.29
(From yocto-docs rev: 4cb67f0f3c3e792b5925d9d3a7002a776e5c85e8)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:21:20 -10:00
Steve Sakoman
9f0c1bc687 cve-exclusion_5.4.inc: update for 5.4.257
(From OE-Core rev: 0f75737a408aef19937ee023a5e6b3e881cbd99b)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:21:20 -10:00
Steve Sakoman
1d15d166d0 patch.py: Use shlex instead of deprecated pipe
The pipe library is deprecated in Python 3.11 and will be removed in
Python 3.13.  pipe.quote is just an import of shlex.quote anyway.

Clean up imports while we're at it.

(From OE-Core rev: a6ef13bdad40826d76a3331cd0878bb22510f375)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
(cherry picked from commit 5f33c7b99a991c380d1813da8248ba5470ca4d4e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:21:19 -10:00
Richard Purdie
5c342965c4 resulttool/report: Avoid divide by zero
Avoid a divide by zero traceback if unfortunate test counts are encountered.

(From OE-Core rev: 33d3374a7149ad1afe86d86c0dc2a948f70e26bd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c5aeea53dfacb53dedb8445cb3523dc3a8cb6dca)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:21:19 -10:00
Meenali Gupta
6f375f52f5 linux-firmware: upgrade 20230625 -> 20230804
License-Update: additional firmwares

upgrade include fix for CVE-2023-20569 CVE-2022-40982 CVE-2023-20593

Changelog:
      https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/

References:
      https://nvd.nist.gov/vuln/detail/CVE-2023-20569
      https://nvd.nist.gov/vuln/detail/CVE-2022-40982
      https://nvd.nist.gov/vuln/detail/CVE-2023-20593

(From OE-Core rev: 42d08fdcd3c95dbef795bb74f0ff5db8ff1b0a19)

Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
(cherry picked from commit d3f1448246c9711f4f23f2e12c664e0ba3ae3f02)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:21:19 -10:00
Siddharth Doshi
52250009cd vim: Upgrade 9.0.2009 -> 9.0.2048
This includes CVE fix for CVE-2023-5535.

(From OE-Core rev: 35fc341402f38619922dcfc4dc9e58b00be26259)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:21:19 -10:00
Ashish Sharma
6f56a14cdc binutils: Backport fix CVE-2023-25588
Upstream-Status: Backport from [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=d12f8998d2d086f0a6606589e5aedb7147e6f2f1]
CVE: CVE-2023-25588
(From OE-Core rev: 6ffbb78f63e5adaadfaa9f5d5e9871ce3cfe7abf)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-27 04:21:19 -10:00
Richard Purdie
f1cf9f0f12 SECURITY.md: Add file
Add a SECURITY.md file with hints for security researchers and other
parties who might report potential security vulnerabilities.

(From meta-yocto rev: d8b84cfded9137a74ab0052ff2d7710887f29f10)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-24 05:22:46 -10:00
Marta Rybczynska
0d5e538519 bitbake: SECURITY.md: add file
Add a SECURITY.md file with hints for security researchers and other
parties who might report potential security vulnerabilities.

(Bitbake rev: dd826595414c5dc1a649f45a9dd2430bf6d4699b)

Signed-off-by: Marta Rybczynska <marta.rybczynska@syslinbit.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-24 05:22:46 -10:00
Marek Vasut
374e198436 systemd: Backport systemd-resolved: use hostname for certificate validation in DoT
Widely accepted certificates for IP addresses are expensive and only
affordable for larger organizations. Therefore if the user provides
the hostname in the DNS= option, we should use it instead of the IP
address.

This fixes https://nvd.nist.gov/vuln/detail/CVE-2018-21029 per
suggestion https://github.com/systemd/systemd-stable/issues/72 .

CVE: CVE-2018-21029
(From OE-Core rev: 6b4a583169ae40a8d51e7ffa33785409b5111a81)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:31 -10:00
Ryan Eatmon
42c52c4f24 kernel.bbclass: Add force flag to rm calls
The latest 6.5 kernels do not appear to create the source file in
${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source so the
recipe errors out when trying to remove it.  Simple fix is to add the
-f (force) flag to the call.

(From OE-Core rev: 2e669bf797b15d803e7d6a700e449bdc467a4bcc)

(From OE-Core rev: 844faa7c51ae8ec0966e9c5c3f70a1dbf2222c21)

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>

Backported from kirkstone commit 7e177848f97e.
Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:31 -10:00
Siddharth Doshi
1a3807e0ca libxpm: upgrade to 3.5.17
- This upgrade includes multiple security fixes.
CVE-2022-4883
CVE-2022-44617
CVE-2022-46285
CVE-2022-44617
CVE-2023-43788
CVE-2023-43789

- Removed CVE-2022-46285 as it is already fixed by this upgrade.

- License-update: additional copyright holders
f0857c0 man pages: Correct Copyright/License notices
Due to this commit LIC_FILES_CHKSUM is changed

- Disable reading compressed files as that requires compress/uncompress executables.
Following the approach in oe-core/master:
7de4084634 libxpm: upgrade 3.5.14 -> 3.5.15

- Add XORG_EXT to specify tar.xz as upstream has switched from bz2 to xz compression.

(From OE-Core rev: 47e270a4fd2e086b5ee9f38891f326ce505f2319)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:30 -10:00
Siddharth Doshi
c7ddb9b198 xorg-lib-common: Add variable to set tarball type
Upstream has switched some new releases from bz2 to xz compression. Add
an XORG_EXT variable so recipes can set the file name extension needed
for the compression type.

Following the approach in oe-core/master: 6a8068e036b4b2a40b38896275b936916b4db76e
xorg-lib-common: Add variable to set tarball type use a variable for the tarball suffix/compression format.

(From OE-Core rev: ff386fb5632c26ceb12d2381e9128b0546aef795)

Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:30 -10:00
Siddharth Doshi
ffbede6d58 vim: Upgrade 9.0.1894 -> 9.0.2009
This includes CVE fix for CVE-2023-5441.

(From OE-Core rev: 624081236d5554dbc7c044396caabc3464b1b3ac)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:30 -10:00
Pawan
2f34ea89db libwebp: Update CVE ID CVE-2023-4863
Notice that it references different CVE id:
https://nvd.nist.gov/vuln/detail/CVE-2023-5129
which was marked as a rejected duplicate of:
https://nvd.nist.gov/vuln/detail/CVE-2023-4863
but it's the same issue. Hence update CVE ID CVE-2023-4863
to CVE-2023-5129.patch.

(From OE-Core rev: 7dce529515baa843ba3e5c89b2ad605b9845c59b)

Signed-off-by: Pawan <badganchipv@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:30 -10:00
Siddharth Doshi
aa99487732 glib-2.0: Fix multiple vulnerabilities
CVE's Fixed:
CVE-2023-29499: glib: GVariant offset table entry size is not checked in is_normal()
CVE-2023-32611: glib: g_variant_byteswap() can take a long time with some non-normal inputs
CVE-2023-32636: glib: Timeout in fuzz_variant_text
CVE-2023-32643: glib: Heap-buffer-overflow in g_variant_serialised_get_child
CVE-2023-32665: glib: GVariant deserialisation does not match spec for non-normal data

(From OE-Core rev: b576beba80d44e67762d46bf3bc2f14c05bc0f6b)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:30 -10:00
Mike Crowe
8ae21cd487 curl: Backport fix for CVE-2023-38546
Take patch from Debian 7.64.0-4+deb10u7.

(From OE-Core rev: 364a9e46f167c2501785cd55a71cf9a614e64710)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
CVE: CVE-2023-38546
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:30 -10:00
Mike Crowe
5a6d2dc704 curl: Backport fix for CVE-2023-38545
Backporting this change required tweaking the error value since the
two-level CURLE_PROXY error reporting was introduced after curl
7.69.1. The test required some tweaks to not rely on more-recent
improvements to the test infrastructure too.

(From OE-Core rev: ccec26b1437f1ece4cb4f27581b0df904297358f)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
CVE: CVE-2023-38545
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:30 -10:00
Marek Vasut
f6f3a08371 libtiff: Add fix for tiffcrop CVE-2023-1916
Add fix for tiffcrop tool CVE-2023-1916 [1].

A flaw was found in tiffcrop, a program distributed by the libtiff
package. A specially crafted tiff file can lead to an out-of-bounds
read in the extractImageSection function in tools/tiffcrop.c, resulting
in a denial of service and limited information disclosure. This issue
affects libtiff versions 4.x.

The tool is no longer part of newer libtiff distributions, hence the
fix is rejected by upstream in [2]. The backport is still applicable
to older versions of libtiff, pick the CVE fix from ubuntu 20.04 [3].

[1] https://nvd.nist.gov/vuln/detail/CVE-2023-1916
[2] https://gitlab.com/libtiff/libtiff/-/merge_requests/535
[3] https://packages.ubuntu.com/source/focal-updates/tiff

(From OE-Core rev: 28ad0fdd30f490612aca6cc96ee503e5f92360a8)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-20 05:35:30 -10:00
Marek Vasut
cd97a607c6 cpio: Replace fix wrong CRC with ASCII CRC for large files with upstream backport
Replace the original "Wrong CRC with ASCII CRC for large files"
patch with upstream backport, and add additional fix on top of
the same problem which upstream detected and fixed.

(From OE-Core rev: 0e167ef0eb7ac62ddb991ce80c27882863d8ee7c)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Sourav Pramanik
f4cb2f5d52 openssl: Upgrade 1.1.1v -> 1.1.1w
https://www.openssl.org/news/openssl-1.1.1-notes.html

Major changes between OpenSSL 1.1.1v and OpenSSL 1.1.1w [11 Sep 2023]

* Fix POLY1305 MAC implementation corrupting XMM registers on Windows (CVE-2023-4807)

(From OE-Core rev: 79b29a5f77efab978f6a2918d02ee611638aef85)

Signed-off-by: Sourav Kumar Pramanik <pramanik.souravkumar@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Marek Vasut
3ee56c9b97 busybox: Backport CVE-2022-48174 fix
There is a stack overflow vulnerability in ash.c:6030 in busybox before
1.35. In the environment of Internet of Vehicles, this vulnerability can
be executed from command to arbitrary code execution.

https://nvd.nist.gov/vuln/detail/CVE-2022-48174

CVE: CVE-2022-48174
(From OE-Core rev: 634daf953e4bd8c6df3ee341b5e93cc81e1a620d)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Vijay Anusuri
eebb034b21 ghostscript: Backport fix CVE-2023-43115
In Artifex Ghostscript through 10.01.2, gdevijs.c in GhostPDL can lead to remote
code execution via crafted PostScript documents because they can switch to the
IJS device, or change the IjsServer parameter, after SAFER has been activated.
NOTE: it is a documented risk that the IJS server can be specified on a gs
command line (the IJS device inherently must execute a command to start the IJS server).

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-43115

Upstream commit:
https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=e59216049cac290fb437a04c4f41ea46826cfba5

(From OE-Core rev: a43f7277061ee6c30c42c9318e3e9dd076563f5d)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Shinu Chandran
e4d507b93b libpcre2 : Follow up fix CVE-2022-1586
CVE-2022-1586 was originally fixed by OE commit
https://github.com/openembedded/openembedded-core/commit/7f4daf88b71f
through libpcre2 commit
https://github.com/PCRE2Project/pcre2/commit/50a51cb7e672

The follow up patch is required to resolve a bug in the initial fix[50a51cb7e672]
https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc3

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2022-1586
https://security-tracker.debian.org/tracker/CVE-2022-1586

(From OE-Core rev: 7e2fe508b456207fd991ece7621ef8ba24b89e59)

Signed-off-by: Shinu Chandran <shinucha@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Hitendra Prajapati
d01194c739 xdg-utils: Fix CVE-2022-4055
Upstream-Status: Backport from f67c4d1f8b

(From OE-Core rev: 22d2c549ba6d8be137d1d290d9a04691ca1858f2)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Julian Haller
ee94c92957 dbus: Add missing CVE_PRODUCT
The current dunfell CVE scans report 0 CVEs for our dbus version. This
is not correct, though, as we use the wrong product name to query it.
Fix this to get a proper CVE list.

(From OE-Core rev: 922872c85d417a5a319aa4beef57ffa4d05faf27)

Signed-off-by: Julian Haller <julian.haller@philips.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Julian Haller
5a893c6e96 dbus: Backport fix for CVE-2023-34969
Upstream commit 37a4dc5835

(From OE-Core rev: 42bf7fee204890b15f80bf0749431aefb33efd99)

Signed-off-by: Julian Haller <julian.haller@philips.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Shubham Kulkarni
43ffc2a5e7 go: Update fix for CVE-2023-24538 & CVE-2023-39318
Add missing files in fix for CVE-2023-24538 & CVE-2023-39318

Upstream Link -
CVE-2023-24538: b1e3ecfa06
CVE-2023-39318: 023b542edf

(From OE-Core rev: cc6f7a8e8805058aababb65e10da7ed2e3d77461)

Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Vijay Anusuri
a9d6f0c153 gawk: backport Debian patch to fix CVE-2023-4156
Upstream-Status: Backport
[https://git.launchpad.net/ubuntu/+source/gawk/tree/debian/patches?h=ubuntu/focal-security
&
https://git.savannah.gnu.org/gitweb/?p=gawk.git;a=commitdiff;h=e709eb829448ce040087a3fc5481db6bfcaae212]

(From OE-Core rev: 68412b76948ce185d87fda73ead7b73e5ad6defd)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Vijay Anusuri
e3ae311c5f cups: Backport fix for CVE-2023-32360 and CVE-2023-4504
Upstream commits:
a0c8b9c955
& 2431caddb7

(From OE-Core rev: d14dce8ba2a8b4bf05c7c5ea7292b0c2c327f088)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-13 05:47:07 -10:00
Mike Crowe
278d77034e glibc: Fix CVE-2023-4911 "Looney Tunables"
Take the patch from the source for Debian's glibc 2.31-13+deb11u7
package, the changelog for which starts with:

 glibc (2.31-13+deb11u7) bullseye-security; urgency=medium

   * debian/patches/any/local-CVE-2023-4911.patch: Fix a buffer overflow in the
     dynamic loader's processing of the GLIBC_TUNABLES environment variable
     (CVE-2023-4911).

This addresses the "Looney Tunables" vulnerability described at
https://www.qualys.com/2023/10/03/cve-2023-4911/looney-tunables-local-privilege-escalation-glibc-ld-so.txt

(From OE-Core rev: 9a800a2e2c2b14eab8c1f83cb4ac3b94a70dd23c)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-06 05:41:57 -10:00
Bruce Ashfield
c0535262c8 linux-yocto/5.4: update to v5.4.257
Updating  to the latest korg -stable release that comprises
the following commits:

    a140610d8aff Linux 5.4.257
    42900fd140c8 net/sched: Retire rsvp classifier
    b3637835ac99 drm/amdgpu: fix amdgpu_cs_p1_user_fence
    650ebbba5c15 mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller
    b1ef1f2f3737 ext4: fix rec_len verify error
    e4efb0aaf288 scsi: megaraid_sas: Fix deadlock on firmware crashdump
    44654114fb6f i2c: aspeed: Reset the i2c controller when timeout occurs
    ce47fe53f78b tracefs: Add missing lockdown check to tracefs_create_dir()
    b6c042d4ac6a nfsd: fix change_info in NFSv4 RENAME replies
    952e477f9080 tracing: Have option files inc the trace array ref count
    ff8cf370d359 tracing: Have current_trace inc the trace array ref count
    a70c6e57316b btrfs: fix lockdep splat and potential deadlock after failure running delayed items
    8e8dcc0f1518 attr: block mode changes of symlinks
    a8403f9fd402 md/raid1: fix error: ISO C90 forbids mixed declarations
    349640248b5e selftests: tracing: Fix to unmount tracefs for recovering environment
    5b50c95cf842 btrfs: compare the correct fsid/metadata_uuid in btrfs_validate_super
    b61aad18b38a btrfs: add a helper to read the superblock metadata_uuid
    bd0fe5489102 btrfs: move btrfs_pinned_by_swapfile prototype into volumes.h
    a04cce3e79c6 perf tools: Add an option to build without libbfd
    f3701ef61fd7 perf jevents: Make build dependency on test JSONs
    a12e9ba7f346 tools features: Add feature test to check if libbfd has buildid support
    964e025ceefd kobject: Add sanity check for kset->kobj.ktype in kset_register()
    545d1070ed7c media: pci: ipu3-cio2: Initialise timing struct to avoid a compiler warning
    44d72e9edd1b serial: cpm_uart: Avoid suspicious locking
    2cbe6a88fbdd scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show()
    9cd6b3802d7c usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc
    abe0cd279aee media: pci: cx23885: replace BUG with error return
    641e60223971 media: tuners: qt1010: replace BUG_ON with a regular error
    991c77fe18c6 media: az6007: Fix null-ptr-deref in az6007_i2c_xfer()
    8dc5b370254a media: anysee: fix null-ptr-deref in anysee_master_xfer
    0c02eb70b1dd media: af9005: Fix null-ptr-deref in af9005_i2c_xfer
    beb9550494e7 media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
    b49c6e5dd236 media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer
    7ffe14fce742 powerpc/pseries: fix possible memory leak in ibmebus_bus_init()
    5873df019512 jfs: fix invalid free of JFS_IP(ipimap)->i_imap in diUnmount
    b12ccbfdf653 fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount()
    a7fde3d46ac6 ext2: fix datatype of block number in ext2_xattr_set2()
    25a68f2286be md: raid1: fix potential OOB in raid1_remove_disk()
    77918680ab07 bus: ti-sysc: Configure uart quirks for k3 SoC
    279e32b79d03 drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()
    3beb97bed860 wifi: mac80211_hwsim: drop short frames
    6773ea9982dc alx: fix OOB-read compiler warning
    fd1a177d2ccb mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450
    ff75c853b7db tpm_tis: Resend command to recover from data transfer errors
    61f5453e9706 crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()
    d1473fc030d3 wifi: mwifiex: fix fortify warning
    38eb4ef67f60 wifi: ath9k: fix printk specifier
    93f4a0b74413 devlink: remove reload failed checks in params get/set callbacks
    aadb178c5123 hw_breakpoint: fix single-stepping when using bpf_overflow_handler
    cb37e7fa2339 perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09
    4de282f49135 ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470
    d0a13c395e22 kernel/fork: beware of __put_task_struct() calling context
    3bf4463e40a1 ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer
    117fb80cd1e6 locks: fix KASAN: use-after-free in trace_event_raw_event_filelock_lock
    7afbfde45d66 btrfs: output extra debug info if we failed to find an inline backref
    6079dc77c6f3 autofs: fix memory leak of waitqueues in autofs_catatonic_mode
    8c027a5798f1 parisc: Drop loops_per_jiffy from per_cpu struct
    4316b8294503 drm/amd/display: Fix a bug when searching for insert_above_mpcc
    1ce8362b4ac6 kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg().
    b5fc6fd660ab ixgbe: fix timestamp configuration code
    f9f3ce7719eb net/tls: do not free tls_rec on async operation in bpf_exec_tx_verdict()
    08d36f317c40 platform/mellanox: mlxbf-tmfifo: Drop jumbo frames
    0507815ae94b mlxbf-tmfifo: sparse tags for config access
    7efc9e97f6e2 platform/mellanox: mlxbf-tmfifo: Drop the Rx packet if no more descriptors
    479c71cda14b kcm: Fix memory leak in error path of kcm_sendmsg()
    c565533407cd r8152: check budget for r8152_poll()
    653fbddbdfc6 net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()
    ba6673824efa net: ethernet: mvpp2_main: fix possible OOB write in mvpp2_ethtool_get_rxnfc()
    5624f26a3574 net: ipv4: fix one memleak in __inet_del_ifa()
    e757ca9c1ca1 clk: imx8mm: Move 1443X/1416X PLL clock structure to common place
    75e0bd976154 ARM: dts: BCM5301X: Extend RAM to full 256MB for Linksys EA6500 V2
    5f71716772b8 usb: typec: bus: verify partner exists in typec_altmode_attention
    14fe0f8627f8 usb: typec: tcpm: Refactor tcpm_handle_vdm_request
    979f8743f373 usb: typec: tcpm: Refactor tcpm_handle_vdm_request payload handling
    6ca8e31480b5 perf tools: Handle old data in PERF_RECORD_ATTR
    dffa46d0ca52 perf hists browser: Fix hierarchy mode header
    6095dd28217e mtd: rawnand: brcmnand: Fix potential false time out warning
    aae45746f4ae mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write
    09417fbf12f8 mtd: rawnand: brcmnand: Fix crash during the panic_write
    aa64f6f0ce7e btrfs: use the correct superblock to compare fsid in btrfs_validate_super
    6eb1fc314ce4 btrfs: don't start transaction when joining with TRANS_JOIN_NOSTART
    b0d236e3afac fuse: nlookup missing decrement in fuse_direntplus_link
    0e918d7c00da ata: pata_ftide010: Add missing MODULE_DESCRIPTION
    e03ac1773414 ata: sata_gemini: Add missing MODULE_DESCRIPTION
    118db787bab3 sh: boards: Fix CEU buffer size passed to dma_declare_coherent_memory()
    89099d73b2dd net: hns3: fix the port information display when sfp is absent
    a44602888bbe netfilter: nfnetlink_osf: avoid OOB read
    62c363e6041c ip_tunnels: use DEV_STATS_INC()
    a5dffc12038f idr: fix param name in idr_alloc_cyclic() doc
    6b0cb9c05584 s390/zcrypt: don't leak memory if dev_set_name() fails
    c149b61301fe igb: Change IGB_MIN to allow set rx/tx value between 64 and 80
    4a5defbfe88b igbvf: Change IGBVF_MIN to allow set rx/tx value between 64 and 80
    c805b8741476 igc: Change IGC_MIN to allow set rx/tx value between 64 and 80
    8047a4898498 kcm: Destroy mutex in kcm_exit_net()
    a6d11571b91d net: sched: sch_qfq: Fix UAF in qfq_dequeue()
    f1ba9a03b166 af_unix: Fix data race around sk->sk_err.
    1ffed3ea8750 af_unix: Fix data-races around sk->sk_shutdown.
    5d91b7891f4a af_unix: Fix data-race around unix_tot_inflight.
    adcf4e069358 af_unix: Fix data-races around user->unix_inflight.
    e13db62db9ef net: ipv6/addrconf: avoid integer underflow in ipv6_create_tempaddr
    23b4b1a069e9 veth: Fixing transmit return status for dropped packets
    0133bc289720 igb: disable virtualization features on 82580
    41f10a4d78fe net: read sk->sk_family once in sk_mc_loop()
    cd12efc54ff8 ipv4: annotate data-races around fi->fib_dead
    01585fa32650 sctp: annotate data-races around sk->sk_wmem_queued
    04301da4d870 pwm: lpc32xx: Remove handling of PWM channels
    565f7bb0b3fe watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load
    7a0e41223e98 perf top: Don't pass an ERR_PTR() directly to perf_session__delete()
    c5be10f1bf61 x86/virt: Drop unnecessary check on extended CPUID level in cpu_has_svm()
    1d0cc1a9c4bd perf annotate bpf: Don't enclose non-debug code with an assert()
    c7cc4dc2473c kconfig: fix possible buffer overflow
    0158dab8e8b8 NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info
    64c5e916fabe soc: qcom: qmi_encdec: Restrict string length in decode
    5c7608d976ab clk: qcom: gcc-mdm9615: use proper parent for pll0_vote clock
    b88626c47217 parisc: led: Reduce CPU overhead for disk & lan LED computation
    536f30922556 parisc: led: Fix LAN receive and transmit LEDs
    cbfffe51221b lib/test_meminit: allocate pages up to order MAX_ORDER
    9b7f6e500969 drm/ast: Fix DRAM init on AST2200
    8ffa40ff64aa fbdev/ep93xx-fb: Do not assign to struct fb_info.dev
    6d5eb57a02a5 scsi: qla2xxx: Remove unsupported ql2xenabledif option
    e24bc58113d1 scsi: qla2xxx: Turn off noisy message log
    05935f9106f1 scsi: qla2xxx: Fix erroneous link up failure
    61641000ad33 scsi: qla2xxx: fix inconsistent TMF timeout
    f966dc8c2d18 net/ipv6: SKB symmetric hash should incorporate transport ports
    d31331e2df6e drm: fix double free for gbo in drm_gem_vram_init and drm_gem_vram_create
    34eb4bd9152c udf: initialize newblock to 0
    206d2b7bafc0 usb: typec: tcpci: clear the fault status bit
    824421868102 serial: sc16is7xx: fix broken port 0 uart init
    159bc8c6b5db sc16is7xx: Set iobase to device index
    355ac795843f cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
    5e7d0acc69b5 crypto: stm32 - fix loop iterating through scatterlist for DMA
    306e356d583d s390/ipl: add missing secure/has_secure file to ipl type 'unknown'
    e972231db29b pstore/ram: Check start of empty przs during init
    b6c9d040191f fsverity: skip PKCS#7 parser when keyring is empty
    712491c9abf2 net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
    15b3727108c7 X.509: if signature is unsupported skip validation
    7a7dd70cb954 dccp: Fix out of bounds access in DCCP error handler
    1c675c937cb2 dlm: fix plock lookup when using multiple lockspaces
    8cd1c5cec6c9 parisc: Fix /proc/cpuinfo output for lscpu
    0337bb53cb7d procfs: block chmod on /proc/thread-self/comm
    2e1f12ce0da7 Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
    eb1fa4819d9c ntb: Fix calculation ntb_transport_tx_free_entry()
    b2a6a169c222 ntb: Clean up tx tail index on link down
    94491412a2af ntb: Drop packets when qp link is down
    ff3bb51e2136 media: dvb: symbol fixup for dvb_attach()
    b047ac1528a1 xtensa: PMU: fix base address for the newer hardware
    2791a2a69a2c backlight/lv5207lp: Compare against struct fb_info.device
    bc86f29e1281 backlight/bd6107: Compare against struct fb_info.device
    3dd8ff569596 backlight/gpio_backlight: Compare against struct fb_info.device
    c2e1ce4fa498 ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
    f53ab5a2bf20 ipmi_si: fix a memleak in try_smi_init()
    e7f97980f735 ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
    29811f4b8255 PM / devfreq: Fix leak in devfreq_dev_release()
    c2ad60ed38b8 igb: set max size RX buffer when store bad packet is enabled
    d44403ec0676 skbuff: skb_segment, Call zero copy functions before using skbuff frags
    64831fb6a204 netfilter: xt_sctp: validate the flag_info count
    28ce8495b559 netfilter: xt_u32: validate user space input
    109e830585e8 netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
    3d54e9949930 igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
    ec6ad9d99ef4 virtio_ring: fix avail_wrap_counter in virtqueue_add_packed
    12fcca2ee445 cpufreq: Fix the race condition while updating the transition_task of policy
    fe5dd3950178 dmaengine: ste_dma40: Add missing IRQ check in d40_probe
    e0f2d85ea3d0 um: Fix hostaudio build errors
    88d508faf3dd mtd: rawnand: fsmc: handle clk prepare error in fsmc_nand_resume()
    efa7f31669f0 rpmsg: glink: Add check for kstrdup
    d2473df751d2 phy/rockchip: inno-hdmi: do not power on rk3328 post pll on reg write
    f36a06988c19 phy/rockchip: inno-hdmi: round fractal pixclock in rk3328 recalc_rate
    b0d5d77b14b4 phy/rockchip: inno-hdmi: use correct vco_div_5 macro on rk3328
    90e037cabc2c tracing: Fix race issue between cpu buffer write and swap
    ac78921ec246 x86/speculation: Mark all Skylake CPUs as vulnerable to GDS
    df7ca43fe090 HID: multitouch: Correct devm device reference for hidinput input_dev name
    cf48a7ba5c09 HID: logitech-dj: Fix error handling in logi_dj_recv_switch_to_dj_mode()
    011daffb53ce RDMA/siw: Correct wrong debug message
    35a78898cdfd RDMA/siw: Balance the reference of cep->kref in the error path
    9b6296861a5a Revert "IB/isert: Fix incorrect release of isert connection"
    03db4fe7917b amba: bus: fix refcount leak
    93a4aefa5745 serial: tegra: handle clk prepare error in tegra_uart_hw_init()
    d2bf25674cea scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
    b1e3199bade0 scsi: core: Use 32-bit hostnum in scsi_host_lookup()
    103b41e97275 media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors
    009b1202a099 media: ov2680: Fix vflip / hflip set functions
    560624cf1d3a media: ov2680: Fix ov2680_bayer_order()
    218b60bc06bc media: ov2680: Remove auto-gain and auto-exposure controls
    768d4d230c02 media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips
    c04ae531eea6 media: ov5640: Enable MIPI interface in ov5640_set_power_mipi()
    916219c523e0 media: i2c: ov5640: Configure HVP lines in s_power callback
    93c518d28600 USB: gadget: f_mass_storage: Fix unused variable warning
    0d8c6770983e media: go7007: Remove redundant if statement
    38269b9ec843 iommu/vt-d: Fix to flush cache of PASID directory table
    a94aaffe9290 IB/uverbs: Fix an potential error pointer dereference
    c3a679853826 driver core: test_async: fix an error code
    27a218419c86 dma-buf/sync_file: Fix docs syntax
    c9e6c1fefcd5 coresight: tmc: Explicit type conversions to prevent integer overflow
    463934ca5d98 scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
    668ce8d508a3 scsi: qedf: Do not touch __user pointer in qedf_dbg_debug_cmd_read() directly
    06a2dde58f40 scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
    e26d52128691 x86/APM: drop the duplicate APM_MINOR_DEV macro
    c65be6ad55e5 serial: sprd: Fix DMA buffer leak issue
    730d1b7ec94c serial: sprd: Assign sprd_port after initialized to avoid wrong access
    dff8066579c0 serial: sprd: remove redundant sprd_port cleanup
    a7d80271a150 serial: sprd: getting port index via serial aliases only
    47f3be62eab5 scsi: qla4xxx: Add length check when parsing nlattrs
    bc66e701ca8f scsi: be2iscsi: Add length check when parsing nlattrs
    161d4509dde4 scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
    bc4fbf2dab31 usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()
    de4345fe4312 media: mediatek: vcodec: Return NULL if no vdec_fb is found
    02c0ea731f31 media: cx24120: Add retval check for cx24120_message_send()
    75d6ef197c48 media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
    74697b417624 media: dib7000p: Fix potential division by zero
    afd90d353f80 drivers: usb: smsusb: fix error handling code in smsusb_init_device
    4bc5ffaf8ac4 media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
    008b334af84a media: v4l2-fwnode: simplify v4l2_fwnode_parse_link
    064e156e9f66 media: v4l2-fwnode: fix v4l2_fwnode_parse_link handling
    7a9619e38c2b NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN
    16282aeca44b NFSD: da_addr_body field missing in some GETDEVICEINFO replies
    93a14ab67582 fs: lockd: avoid possible wrong NULL parameter
    d3351799be41 jfs: validate max amount of blocks before allocation.
    65bf8a196ba2 powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
    650803f93dd8 nfs/blocklayout: Use the passed in gfp flags
    68ba08ab40c5 wifi: ath10k: Use RMW accessors for changing LNKCTL
    ab28c56192f5 drm/radeon: Use RMW accessors for changing LNKCTL
    d835a13232c0 drm/radeon: Prefer pcie_capability_read_word()
    06c0c15ab03c drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions
    30e633dbcd4c drm/radeon: Correct Transmit Margin masks
    108ce391d6da drm/amdgpu: Use RMW accessors for changing LNKCTL
    7085f1aab194 drm/amdgpu: Prefer pcie_capability_read_word()
    62a1c1bd45d8 drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions
    adf810206cca drm/amdgpu: Correct Transmit Margin masks
    7f9129b66c87 PCI: Add #defines for Enter Compliance, Transmit Margin
    81d1de3b9793 powerpc/fadump: reset dump area size if fadump memory reserve fails
    7159a27b1ac1 clk: imx: composite-8m: fix clock pauses when set_rate would be a no-op
    044ff5356a3b PCI/ASPM: Use RMW accessors for changing LNKCTL
    73d73556ed1d PCI: pciehp: Use RMW accessors for changing LNKCTL
    e7e3268ae9b7 PCI: Mark NVIDIA T4 GPUs to avoid bus reset
    a611e38d5b94 clk: sunxi-ng: Modify mismatched function name
    9ad9cca12b10 drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
    de677f4379fa ipmi:ssif: Fix a memory leak when scanning for an adapter
    ef0d286989b1 ipmi:ssif: Add check for kstrdup
    90fddb87892e ALSA: ac97: Fix possible error value of *rac97
    0b1e48e4dccb of: unittest: Fix overlay type in apply/revert check
    0a6f39488c38 drm/mediatek: Fix potential memory leak if vmap() fail
    f6364fa751d7 audit: fix possible soft lockup in __audit_inode_child()
    43f0c2bb16af smackfs: Prevent underflow in smk_set_cipso()
    b8a61df6f404 drm/msm/mdp5: Don't leak some plane state
    1f3d0e65d111 ima: Remove deprecated IMA_TRUSTED_KEYRING Kconfig
    dbdc828991ae drm/panel: simple: Add missing connector type and pixel format for AUO T215HVN01
    4db0a85cf865 drm/armada: Fix off-by-one error in armada_overlay_get_property()
    dadf0d0dfcc8 of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
    def1fd88ae97 drm/tegra: dpaux: Fix incorrect return value of platform_get_irq
    c1ff601e1aa5 drm/tegra: Remove superfluous error messages around platform_get_irq()
    1603f086200a md/md-bitmap: hold 'reconfig_mutex' in backlog_store()
    630be0110e6a md/bitmap: don't set max_write_behind if there is no write mostly device
    a8f8c4e7281c drm/amdgpu: Update min() to min_t() in 'amdgpu_info_ioctl'
    c6b423ab655c arm64: dts: qcom: sdm845: Add missing RPMh power domain to GCC
    69d9fb39480c ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
    e6fc20a5425b drm: adv7511: Fix low refresh rate register for ADV7533/5
    88d32b9ad274 ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)
    dfe36c23abf9 ARM: dts: s5pv210: add dummy 5V regulator for backlight on SMDKv210
    febead00308f ARM: dts: s5pv210: correct ethernet unit address in SMDKV210
    00b3f8004bdc ARM: dts: s5pv210: use defines for IRQ flags in SMDKV210
    9dff1deb2507 ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKV210
    df9929c61c9d ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
    c20456c2cd29 ARM: dts: s3c64xx: align pinctrl with dtschema
    a355d140eb49 ARM: dts: s3c6410: align node SROM bus node name with dtschema in Mini6410
    e5deee40fa04 ARM: dts: s3c6410: move fixed clocks under root node in Mini6410
    d38b67da1572 drm/etnaviv: fix dumping of active MMU context
    5b8c8527a2c3 ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
    5680c01363ea ARM: dts: BCM53573: Add cells sizes to PCIe node
    17a5848bdca0 ARM: dts: BCM53573: Drop nonexistent "default-off" LED trigger
    c01cbe6c0345 drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar()
    d40c192e1198 quota: fix dqput() to follow the guarantees dquot_srcu should provide
    dd918952b1ed quota: add new helper dquot_active()
    88c0cdfe10fb quota: rename dquot_active() to inode_quota_active()
    29d7249bb61c quota: factor out dquot_write_dquot()
    f2f64c2951a3 quota: avoid increasing DQST_LOOKUPS when iterating over dirty/inuse list
    1e4f7ce32a1d drm/bridge: tc358764: Fix debug print parameter order
    835f0a848a8b netrom: Deny concurrent connect().
    da13749d5ff7 net/sched: sch_hfsc: Ensure inner classes have fsc curve
    83382eafc745 mlxsw: i2c: Limit single transaction buffer size
    b2d7f0f313b8 mlxsw: i2c: Fix chunk size setting in output mailbox buffer
    400ef5f79c90 net: arcnet: Do not call kfree_skb() under local_irq_disable()
    f306bbdce631 wifi: ath9k: use IS_ERR() with debugfs_create_dir()
    231086e6a363 wifi: mwifiex: avoid possible NULL skb pointer dereference
    5f6f00bcf947 wifi: ath9k: protect WMI command response buffer replacement with a lock
    ff703b5f3f3c wifi: ath9k: fix races between ath9k_wmi_cmd and ath9k_wmi_ctrl_rx
    df1753eae74b wifi: mwifiex: Fix missed return in oob checks failed path
    8f717752f94e wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
    ab4810042cdd fs: ocfs2: namei: check return value of ocfs2_add_entry()
    dbe64279ae34 lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
    67f8f2bae8e7 lwt: Fix return values of BPF xmit ops
    12bf7d9cc6af hwrng: iproc-rng200 - Implement suspend and resume calls
    4f1ca8e39732 hwrng: iproc-rng200 - use semicolons rather than commas to separate statements
    6c015ebce180 crypto: caam - fix unchecked return value error
    ec348676c7d0 Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
    0ce06035ea67 crypto: stm32 - Properly handle pm_runtime_get failing
    34de9f1d6359 wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
    87f8c5442373 mwifiex: switch from 'pci_' to 'dma_' API
    29eca8b7863d wifi: mwifiex: Fix OOB and integer underflow when rx packets
    042aeb45e484 can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
    516f21f21068 spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
    4fb6fcc04a99 regmap: rbtree: Use alloc_flags for memory allocations
    57935355dc67 tcp: tcp_enter_quickack_mode() should be static
    75b8b5b52985 bpf: Clear the probe_addr for uprobe
    a0fa690894c1 cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
    991b7c260476 perf/imx_ddr: don't enable counter0 if none of 4 counters are used
    07415be140d0 x86/decompressor: Don't rely on upper 32 bits of GPRs being preserved
    6dbac48ea344 x86/boot: Annotate local functions
    c418814fae86 x86/asm: Make more symbols local
    3eb241e47d05 OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd()
    5d3975e36c64 tmpfs: verify {g,u}id mount options correctly
    48c54877ce33 fs: Fix error checking for d_hash_and_lookup()
    0c8c20538115 new helper: lookup_positive_unlocked()
    0a2b1eb8a9ce eventfd: prevent underflow for eventfd semaphores
    3e9617d63edf eventfd: Export eventfd_ctx_do_read()
    f59ff666989c reiserfs: Check the return value from __getblk()
    e74903b5fbc9 Revert "net: macsec: preserve ingress frame ordering"
    b36c4a731aae udf: Handle error when adding extent to a file
    7648ea9896b3 udf: Check consistency of Space Bitmap Descriptor
    3e2265cda14e powerpc/32s: Fix assembler warning about r0
    aea73dde7180 net: Avoid address overwrite in kernel_connect
    d7d42f114252 platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifications
    6614af25e142 ALSA: seq: oss: Fix racy open/close of MIDI devices
    601dc776a09a scsi: storvsc: Always set no_report_opcodes
    107f5cad230b cifs: add a warning when the in-flight count goes negative
    f31618e4fc00 sctp: handle invalid error codes without calling BUG()
    8d7395d0ea5e bnx2x: fix page fault following EEH recovery
    c1ce2f09573e netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
    499eb477f76b scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
    d0189e40c2d1 idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
    617d1d0e1730 net: usb: qmi_wwan: add Quectel EM05GV2
    5d2481bc924e clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
    3899c1d158c5 security: keys: perform capable check only on privileged operations
    97ed1be29bf0 platform/x86: huawei-wmi: Silence ambient light sensor
    762c352dfc41 platform/x86: intel: hid: Always call BTNL ACPI method
    0e3f0e55974c ASoC: atmel: Fix the 8K sample parameter in I2SC master
    0b718d1d5780 ASoc: codecs: ES8316: Fix DMIC config
    b796adfc9869 fs/nls: make load_nls() take a const parameter
    35a9b057bfd4 s390/dasd: fix hanging device after request requeue
    d7768b33d0fd s390/dasd: use correct number of retries for ERP requests
    a21ff228f0e1 m68k: Fix invalid .section syntax
    4dfc0d1edad3 vxlan: generalize vxlan_parse_gpe_hdr and remove unused args
    d65c5ef975d1 ethernet: atheros: fix return value check in atl1c_tso_csum()
    ea95a0111494 ASoC: da7219: Check for failure reading AAD IRQ events
    216953c3de60 ASoC: da7219: Flush pending AAD IRQ when suspending
    b6f827c3f8db 9p: virtio: make sure 'offs' is initialized in zc_request
    b6fefef07dca pinctrl: amd: Don't show `Invalid config param` errors
    99a73016a5e1 nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
    724474dfaa98 nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
    efe8244ba960 fsi: master-ast-cf: Add MODULE_FIRMWARE macro
    6b701dab1993 firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
    bee7f3a49469 serial: sc16is7xx: fix bug when first setting GPIO direction
    a6650d27ab2c Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition
    5876cae6d6ef staging: rtl8712: fix race condition
    a17c6efa1413 HID: wacom: remove the battery when the EKR is off
    e4f5ad7b539a USB: serial: option: add FOXCONN T99W368/T99W373 product
    837f6647b2bf USB: serial: option: add Quectel EM05G variant (0x030e)
    1d2432804815 modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
    6938ef59e3ff rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
    0e0914f9a899 net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index
    6b39bd898bb0 mmc: au1xmmc: force non-modular build and remove symbol_get usage
    7a67c5d93292 ARM: pxa: remove use of symbol_get()
    e83f5d13cb73 erofs: ensure that the post-EOF tails are all zeroed

(From OE-Core rev: 0111b5b152c1bcff0ab26cf8632ca9002237f070)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Bruce Ashfield
5ee2872089 linux-yocto/5.4: update to v5.4.256
Updating  to the latest korg -stable release that comprises
the following commits:

    0c2544add9fc Linux 5.4.256
    1ba96e65ef4c Revert "MIPS: Alchemy: fix dbdma2"
    94aef0fe5a82 powerpc/pmac/smp: Drop unnecessary volatile qualifier
    b29a10fd0734 powerpc/pmac/smp: Avoid unused-variable warnings
    5eb967dd50a5 Linux 5.4.255
    e171795856a6 dma-buf/sw_sync: Avoid recursive lock during fence signal
    f49cac7634da pinctrl: renesas: rza2: Add lock around pinctrl_generic{{add,remove}_group,{add,remove}_function}
    197c546a598a clk: Fix undefined reference to `clk_rate_exclusive_{get,put}'
    7fd9cded5646 scsi: core: raid_class: Remove raid_component_add()
    56428d89a0da scsi: snic: Fix double free in snic_tgt_create()
    b6db4ef5ea41 irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
    61b5d77169e1 Documentation/sysctl: document page_lock_unfairness
    b2421a196cb0 ALSA: pcm: Check for null pointer of pointer substream before dereferencing it
    e8bf830efa8a interconnect: Do not skip aggregation for disabled paths
    456a7a73404c Revert "ALSA: pcm: Use SG-buffer only when direct DMA is available"
    52a7c86e63d2 ALSA: pcm: Fix build error on m68k and others
    a1ef12540ebd rtnetlink: Reject negative ifindexes in RTM_NEWLINK
    c404e1e19780 mm: allow a controlled amount of unfairness in the page lock
    97640d8e2cee x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4
    b156ce3b3b61 drm/display/dp: Fix the DP DSC Receiver cap size
    9e5fe282f9e2 PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus
    ac0e0df5180c media: vcodec: Fix potential array out-of-bounds in encoder queue_setup
    79a05ca73637 radix tree: remove unused variable
    32639f13441b lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
    c5f261825ff6 batman-adv: Hold rtnl lock during MTU update via netlink
    61b71562beb3 batman-adv: Fix batadv_v_ogm_aggr_send memory leak
    5fb1a2133707 batman-adv: Fix TT global entry leak when client roamed back
    e6e9d7808179 batman-adv: Do not get eth header before batadv_check_management_packet
    c97442e09884 batman-adv: Don't increase MTU when set by user
    22288ea6beba batman-adv: Trigger events for auto adjusted MTU
    3b83759fd46c nfsd: Fix race to FREE_STATEID and cl_revoked
    c0284760f470 clk: Fix slab-out-of-bounds error in devm_clk_release()
    a0bc5cf2e7f4 NFSv4: Fix dropped lock for racing OPEN and delegation return
    815fb2531a48 ibmveth: Use dcbf rather than dcbfl
    35e31aff6160 bonding: fix macvlan over alb bond support
    faf3f988cc63 net: remove bond_slave_has_mac_rcu()
    eebd074af272 net/sched: fix a qdisc modification with ambiguous command request
    62383d9fa1af igb: Avoid starting unnecessary workqueues
    adef04cc4819 net: validate veth and vxcan peer ifindexes
    52ddda8d218b net: bcmgenet: Fix return value check for fixed_phy_register()
    189ad377d1ca net: bgmac: Fix return value check for fixed_phy_register()
    dcbfcb54a28f ipvlan: Fix a reference count leak warning in ipvlan_ns_exit()
    8e6433fecb2b dccp: annotate data-races in dccp_poll()
    7d6cc6919952 sock: annotate data-races around prot->memory_pressure
    d28ea7acfae7 octeontx2-af: SDP: fix receive link config
    05319d707732 tracing: Fix memleak due to race between current_tracer and trace
    c8920972d086 drm/amd/display: check TG is non-null before checking if enabled
    7d4174a99b1d drm/amd/display: do not wait for mpc idle if tg is disabled
    94239d1830a1 ASoC: fsl_sai: Disable bit clock with transmitter
    ef9cae4a6c8d ASoC: fsl_sai: Add new added registers and new bit definition
    1b3d75104542 ASoC: fsl_sai: Refine enable/disable TE/RE sequence in trigger()
    f9afb326b7ba regmap: Account for register length in SMBus I/O limits
    7e1d1456c8db ALSA: pcm: Fix potential data race at PCM memory allocation helpers
    140797d0a46e ALSA: pcm: Use SG-buffer only when direct DMA is available
    95b30a431254 ALSA: pcm: Set per-card upper limit of PCM buffer allocations
    d0ef103e192c dm integrity: reduce vmalloc space footprint on 32-bit architectures
    072d247d7a62 dm integrity: increase RECALC_SECTORS to improve recalculate speed
    4e96ee117500 fbdev: fix potential OOB read in fast_imageblit()
    ebf84320a587 fbdev: Fix sys_imageblit() for arbitrary image widths
    96f8e80656ec fbdev: Improve performance of sys_imageblit()
    7e5b7360df81 MIPS: cpu-features: Use boot_cpu_type for CPU type based features
    302a8fbf8cab MIPS: cpu-features: Enable octeon_cache by cpu_type
    7b57fc3f4c49 fs: dlm: fix mismatch of plock results from userspace
    721d5b514dfc fs: dlm: use dlm_plock_info for do_unlock_close
    da794f6dd549 fs: dlm: change plock interrupted message to debug again
    f03726ef19e1 fs: dlm: add pid to debug log
    8b73497e50ef dlm: replace usage of found with dedicated list iterator variable
    526cc04d718b dlm: improve plock logging if interrupted
    7abd6dce29f6 PCI: acpiphp: Reassign resources on bridge if necessary
    fce081555293 net: phy: broadcom: stub c45 read/write for 54810
    e91d5ace7051 mmc: f-sdh30: fix order of function calls in sdhci_f_sdh30_remove
    a0e20e267aec net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure
    f0c10a4497af net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
    b1be2cfcf6cf virtio-net: set queues after driver_ok
    4821df2ffe38 af_unix: Fix null-ptr-deref in unix_stream_sendpage().
    0afc186aba1e netfilter: set default timeout to 3 secs for sctp shutdown send and recv state
    6875690b0eea mmc: block: Fix in_flight[issue_type] value error
    54deee3fab1b mmc: wbsd: fix double mmc_free_host() in wbsd_init()
    4259dd534245 cifs: Release folio lock on fscache read hit.
    03373410247b ALSA: usb-audio: Add support for Mythware XA001AU capture and playback interfaces.
    b653289ca646 serial: 8250: Fix oops for port->pm on uart_change_pm()
    7b4e6bff03e2 ASoC: meson: axg-tdm-formatter: fix channel slot allocation
    29d862ee5fef ASoC: rt5665: add missed regulator_bulk_disable
    f21fa1892d42 ARM: dts: imx: Set default tuning step for imx6sx usdhc
    aadee0ae0a5f ARM: dts: imx: Set default tuning step for imx7d usdhc
    a23e10dafd77 ARM: dts: imx: Adjust dma-apbh node name
    536c1bbedd5d ARM: dts: imx7s: Drop dma-apb interrupt-names
    37cfbf847c2d bus: ti-sysc: Flush posted write on enable before reset
    4637b2fa6541 bus: ti-sysc: Improve reset to work with modules with no sysconfig
    210ff31342ad net: do not allow gso_size to be set to GSO_BY_FRAGS
    1c7db7abd4ba sock: Fix misuse of sk_under_memory_pressure()
    aa670bdefc0c net: dsa: mv88e6xxx: Wait for EEPROM done before HW reset
    702c58a05eb5 i40e: fix misleading debug logs
    ac16de2d02eb team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
    81da9e2c4255 netfilter: nft_dynset: disallow object maps
    bdd7c2ff4143 ipvs: fix racy memcpy in proc_do_sync_threshold
    38e5c37bfab1 selftests: mirror_gre_changes: Tighten up the TTL test match
    8046beb890eb xfrm: add NULL check in xfrm_update_ae_params
    d34c30442d5e ip_vti: fix potential slab-use-after-free in decode_session6
    eb47e612e59c ip6_vti: fix slab-use-after-free in decode_session6
    db0e50741f03 xfrm: fix slab-use-after-free in decode_session6
    64c6df80d35a xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c
    32cc777c0a53 net: af_key: fix sadb_x_filter validation
    373848d51fde net: xfrm: Fix xfrm_address_filter OOB read
    a0a462a0f209 btrfs: fix BUG_ON condition in btrfs_cancel_balance
    cc423a972cfd tty: serial: fsl_lpuart: Clear the error flags by writing 1 for lpuart32 platforms
    1d29e21ed09f powerpc/rtas_flash: allow user copy to flash block cache objects
    97ddf1c2105a fbdev: mmp: fix value check in mmphw_probe()
    3259e2d8781f i2c: bcm-iproc: Fix bcm_iproc_i2c_isr deadlock issue
    b788ad3b2468 virtio-mmio: don't break lifecycle of vm_dev
    e22a4b77b69d virtio-mmio: Use to_virtio_mmio_device() to simply code
    432429d1b25f virtio-mmio: convert to devm_platform_ioremap_resource
    12c4c227891e nfsd: Remove incorrect check in nfsd4_validate_stateid
    a4e3c4cd02f5 nfsd4: kill warnings on testing stateids with mismatched clientids
    ff652b0150a4 net/ncsi: Fix gma flag setting after response
    b66a1defb205 tracing/probes: Fix to update dynamic data counter if fetcharg uses it
    bdc309d89b32 tracing/probes: Have process_fetch_insn() take a void * instead of pt_regs
    cc93a372e03e leds: trigger: netdev: Recheck NETDEV_LED_MODE_LINKUP on dev rename
    939b8b312adc mmc: sunxi: fix deferred probing
    c6d1a281ae83 mmc: bcm2835: fix deferred probing
    b48b4b1885f7 USB: dwc3: qcom: fix NULL-deref on suspend
    6da1f9fd9c8e usb: dwc3: qcom: Add helper functions to enable,disable wake irqs
    5335bb0cefde interconnect: Add helpers for enabling/disabling a path
    e062fb979410 interconnect: Move internal structs into a separate file
    abc25a18a64c irqchip/mips-gic: Use raw spinlock for gic_lock
    05de6069b52c irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()
    1224e5a9787c ALSA: hda: Fix unhandled register update during auto-suspend period
    a55d55a30781 PM: runtime: Add pm_runtime_get_if_active()
    e5d98d42bca5 PM-runtime: add tracepoints for usage_count changes
    59aba9d5cd36 iommu/amd: Fix "Guest Virtual APIC Table Root Pointer" configuration in IRTE
    8f302378c704 iio: addac: stx104: Fix race condition when converting analog-to-digital
    7251b2915d33 iio: addac: stx104: Fix race condition for stx104_write_raw()
    70d135e7de08 iio: stx104: Move to addac subdirectory
    8ba99f7fc7eb iio: adc: stx104: Implement and utilize register structures
    4edf338adee7 iio: adc: stx104: Utilize iomap interface
    e13b26d0dd10 iio: add addac subdirectory
    e6f66a0ad755 IMA: allow/fix UML builds
    635278e97a94 powerpc/kasan: Disable KCOV in KASAN code
    109f0aaa0b88 ALSA: hda: fix a possible null-pointer dereference due to data race in snd_hdac_regmap_sync()
    97ed58437705 ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760
    c6059af6bf5e drm/amdgpu: Fix potential fence use-after-free v2
    fe49aa73cca6 Bluetooth: L2CAP: Fix use-after-free
    22100df1d57f pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()
    b4a7ab57effb gfs2: Fix possible data races in gfs2_show_options()
    c4d5c945b69a usb: chipidea: imx: don't request QoS for imx8ulp
    c1c5826223ae media: platform: mediatek: vpu: fix NULL ptr dereference
    ef009fe2010e media: v4l2-mem2mem: add lock to protect parameter num_rdy
    2a8807f9f511 FS: JFS: Check for read-only mounted filesystem in txBegin
    a7d17d6bd7cd FS: JFS: Fix null-ptr-deref Read in txBegin
    2225000d62c1 MIPS: dec: prom: Address -Warray-bounds warning
    6e7d9d76e565 fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
    3f1368af47ac udf: Fix uninitialized array access for some pathnames
    8f203dd401e8 ovl: check type and offset of struct vfsmount in ovl_entry
    8abed186aabd HID: add quirk for 03f0:464a HP Elite Presenter Mouse
    3f378783c47b quota: fix warning in dqgrab()
    c3a1f5ba11c5 quota: Properly disable quotas when add_dquot_ref() fails
    dd445ebbee88 ALSA: emu10k1: roll up loops in DSP setup code for Audigy
    b8fab6aebdf2 drm/radeon: Fix integer overflow in radeon_cs_parser_init
    3a3bb438dae3 macsec: use DEV_STATS_INC()
    b5e20a3ddea4 macsec: Fix traffic counters/statistics
    4b854879f82d selftests: forwarding: tc_flower: Relax success criterion
    e5883ffdd0a8 mmc: sdhci-f-sdh30: Replace with sdhci_pltfm
    e7bd70c3bc62 mmc: sdhci_f_sdh30: convert to devm_platform_ioremap_resource

(From OE-Core rev: 5ab843389d08da0f04636c8dc02998865c6f5c4c)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Bruce Ashfield
f38a69e59f linux-yocto/5.4: update to v5.4.254
Updating  to the latest korg -stable release that comprises
the following commits:

    fd2a1d1f32ea Linux 5.4.254
    e7711f15ed6b sch_netem: fix issues in netem_change() vs get_dist_table()
    3c3ffd6a3cf7 alpha: remove __init annotation from exported page_is_ram()
    e12fac07f61c scsi: core: Fix possible memory leak if device_add() fails
    cea09922f5f7 scsi: snic: Fix possible memory leak if device_add() fails
    12162414a7c1 scsi: 53c700: Check that command slot is not NULL
    048ebc9a28fb scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
    ecb1fbe2879f scsi: core: Fix legacy /proc parsing buffer overflow
    979822844209 netfilter: nf_tables: report use refcount overflow
    137e25f0906e nvme-rdma: fix potential unbalanced freeze & unfreeze
    ab32fbe3fe70 nvme-tcp: fix potential unbalanced freeze & unfreeze
    756c024698f4 btrfs: set cache_block_group_error if we find an error
    fa7bc2684a05 btrfs: don't stop integrity writeback too early
    0a3b5893c6b1 ibmvnic: Handle DMA unmapping of login buffs in release functions
    d66a27113ebb net/mlx5: Allow 0 for total host VFs
    d7b2df974299 dmaengine: mcf-edma: Fix a potential un-allocated memory access
    e913d89445e3 wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
    c2145b18740c IB/hfi1: Fix possible panic during hotplug remove
    9d469552c9d2 drivers: net: prevent tun_build_skb() to exceed the packet size limit
    67eebc7a9217 dccp: fix data-race around dp->dccps_mss_cache
    ef8810965f0c bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
    9c7deea5afcc net/packet: annotate data-races around tp->status
    60d9662f39f5 mISDN: Update parameter type of dsp_cmx_send()
    dd72849bce27 selftests/rseq: Fix build with undefined __weak
    302d848188d6 drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
    ed8dcd9543b8 x86: Move gds_ucode_mitigated() declaration to header
    6b342b1f3b01 x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
    91a5e755e11f x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
    14254212b431 usb: common: usb-conn-gpio: Prevent bailing out if initial role is none
    25038d3f16b9 usb: dwc3: Properly handle processing of pending events
    044f4446e06b usb-storage: alauda: Fix uninit-value in alauda_check_media()
    b97dad01c121 binder: fix memory leak in binder_init()
    182f0e71ff34 iio: cros_ec: Fix the allocation size for cros_ec_command
    d2c539c216cc nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
    655716938d14 x86/pkeys: Revert a5eff7259790 ("x86/pkeys: Add PKRU value to init_fpstate")
    ea1b4c31161f radix tree test suite: fix incorrect allocation size for pthreads
    aa0bfe169d29 drm/nouveau/gr: enable memory loads on helper invocation on all channels
    8a489b0bc87c dmaengine: pl330: Return DMA_PAUSED when transaction is paused
    7c62508d6b91 ipv6: adjust ndisc_is_useropt() to also return true for PIO
    0a67c1262162 mmc: moxart: read scr register without changing byte order
    4b4223f7d26d Linux 5.4.253
    9e5374875f96 Revert "driver core: Annotate dev_err_probe() with __must_check"
    ca33c0704151 drivers: core: fix kernel-doc markup for dev_err_probe()
    04ece65d9bad driver code: print symbolic error code
    f2c1b4f9c157 driver core: Annotate dev_err_probe() with __must_check
    2e8fc2ddffee ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node
    a1ba8725577b ARM: dts: imx6sll: fixup of operating points
    6c71d73945d2 ARM: dts: imx: add usb alias
    66579ee141a5 ARM: dts: imx: Align L2 cache-controller nodename with dtschema
    3b454fb938e1 ARM: dts: imx6sll: Make ssi node name same as other platforms
    03b119d900fd arm64: dts: stratix10: fix incorrect I2C property for SCL signal
    72c946246e21 ceph: defer stopping mdsc delayed_work
    f82fe11a30ae ceph: use kill_anon_super helper
    82edffead586 ceph: show tasks waiting on caps in debugfs caps file
    632023a2b3ac PM: sleep: wakeirq: fix wake irq arming
    d7f34e2cdd12 PM / wakeirq: support enabling wake-up irq after runtime_suspend called
    9cbffa33749a selftests/rseq: Play nice with binaries statically linked against glibc 2.35+
    13553469bdbd selftests/rseq: check if libc rseq support is registered
    a65e7b4b31ca powerpc/mm/altmap: Fix altmap boundary check
    f8cf0f83cf04 mtd: rawnand: omap_elm: Fix incorrect type in assignment
    2af8ed119722 test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
    0f68b0f8eb5a test_firmware: prevent race conditions by a correct implementation of locking
    040cdadf9fdc ext2: Drop fragment support
    0336b42456e4 fs: Protect reconfiguration of sb read-write from racing writes
    a05ac5d00eb7 net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
    a2da00d1ea1a Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
    0a44ceba77c3 fs/sysv: Null check to prevent null-ptr-deref bug
    1202deb153d6 net: tap_open(): set sk_uid from current_fsuid()
    1d53ea776760 net: tun_chr_open(): set sk_uid from current_fsuid()
    ae9cf40873d3 mtd: rawnand: meson: fix OOB available bytes for ECC
    8deaaf4be175 mtd: spinand: toshiba: Fix ecc_get_status
    eacb19bd7cd2 USB: zaurus: Add ID for A-300/B-500/C-700
    5107f9e8db60 libceph: fix potential hang in ceph_osdc_notify()
    6f14228e82fe scsi: zfcp: Defer fc_rport blocking until after ADISC response
    a490c2e8927e tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
    6d49ed957d77 tcp_metrics: annotate data-races around tm->tcpm_net
    fc566cf344d8 tcp_metrics: annotate data-races around tm->tcpm_vals[]
    76b47daba7cd tcp_metrics: annotate data-races around tm->tcpm_lock
    38661fe6d001 tcp_metrics: annotate data-races around tm->tcpm_stamp
    96f14d689dc5 tcp_metrics: fix addr_same() helper
    0438e60a00d4 ip6mr: Fix skb_under_panic in ip6mr_cache_report()
    5b3dbedb8d4a net: dcb: choose correct policy to parse DCB_ATTR_BCN
    363c56f97122 net: ll_temac: fix error checking of irq_of_parse_and_map()
    7928f81443f6 net: ll_temac: Switch to use dev_err_probe() helper
    97d8a0bbda6b driver core: add device probe log helper
    227b8ce59cd3 bpf: sockmap: Remove preempt_disable in sock_map_sk_acquire
    1c8262f31fd2 net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
    83e3d4b0ae37 net/sched: cls_fw: No longer copy tcf_result on update to avoid use-after-free
    be785808db32 net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
    b705759a1a25 net: add missing data-race annotation for sk_ll_usec
    95dd65f29070 net: add missing data-race annotations around sk->sk_peek_off
    8a6dddcb47a6 net: add missing READ_ONCE(sk->sk_rcvbuf) annotation
    ec4b7532d70b net: add missing READ_ONCE(sk->sk_sndbuf) annotation
    9cd3adc26e53 net: add missing READ_ONCE(sk->sk_rcvlowat) annotation
    481186cad78f net: annotate data-races around sk->sk_max_pacing_rate
    1774250a20d7 mISDN: hfcpci: Fix potential deadlock on &hc->lock
    42b28808070e net: sched: cls_u32: Fix match key mis-addressing
    1b047dc9108e perf test uprobe_from_different_cu: Skip if there is no gcc
    ad46d4861ed3 rtnetlink: let rtnl_bridge_setlink checks IFLA_BRIDGE_MODE length
    80381ecf2933 net/mlx5e: fix return value check in mlx5e_ipsec_remove_trailer()
    800d8c96bf99 net/mlx5: DR, fix memory leak in mlx5dr_cmd_create_reformat_ctx
    4730c0a1131c KVM: s390: fix sthyi error handling
    d2fb0969262c word-at-a-time: use the same return type for has_zero regardless of endianness
    be4d2b456206 loop: Select I/O scheduler 'none' from inside add_disk()
    11e929c38029 perf: Fix function pointer case
    1db90f97d719 arm64: Fix bit-shifting UB in the MIDR_CPU_MODEL() macro
    f41cab7a4653 arm64: Add AMPERE1 to the Spectre-BHB affected list
    6e4aa8c89034 ASoC: cs42l51: fix driver to properly autoload with automatic module loading
    cf8ecd6ea680 net/sched: sch_qfq: account for stab overhead in qfq_enqueue
    0e0f324c259d btrfs: fix race between quota disable and quota assign ioctls
    4f8f86bc5d33 btrfs: qgroup: return ENOTCONN instead of EINVAL when quotas are not enabled
    8c1d1f3a33e5 btrfs: qgroup: remove one-time use variables for quota_root checks
    c8b1499e420e cpufreq: intel_pstate: Drop ACPI _PSS states table patching
    f331413e1cf1 ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily
    511851c87031 ACPI: processor: perflib: Use the "no limit" frequency QoS
    81cd6ceee7ce dm cache policy smq: ensure IO doesn't prevent cleaner policy progress
    e3efc4767a46 ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register
    00748bc586a4 s390/dasd: fix hanging device after quiesce/resume
    73e872466ddc virtio-net: fix race between set queues and probe
    6db2a3c5c201 btrfs: check if the transaction was aborted at btrfs_wait_for_commit()
    5adbd7ccd430 irq-bcm6345-l1: Do not assume a fixed block to cpu mapping
    a0019e13a9e9 tpm_tis: Explicitly check for error code
    d1c6e68003d3 btrfs: check for commit error at btrfs_attach_transaction_barrier()
    ee2eed8306b3 hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
    5373a1aa91b2 staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
    352e0cae4cce Documentation: security-bugs.rst: clarify CVE handling
    e331a88ea56b Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
    fd21197af575 Revert "usb: xhci: tegra: Fix error check"
    e0c92c329131 usb: xhci-mtk: set the dma max_seg_size
    3f39d58a0c1a USB: quirks: add quirk for Focusrite Scarlett
    8f86b1b3b539 usb: ohci-at91: Fix the unhandle interrupt when resume
    640cb5f5e4b4 usb: dwc3: don't reset device side if dwc3 was configured as host-only
    a7d080cf4fab usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
    5fc6ace75ceb Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
    80d40a3d6d45 can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED
    58f0affb3c47 USB: serial: simple: sort driver entries
    43ee3cf0c783 USB: serial: simple: add Kaufmann RKS+CAN VCP
    bcf1fc781ea1 USB: serial: option: add Quectel EC200A module support
    3ec7c5ef6021 USB: serial: option: support Quectel EM060K_128
    da7ebd86cd2e serial: sifive: Fix sifive_serial_console_setup() section
    d674cb90a9ef serial: 8250_dw: Preserve original value of DLF register
    cdcc35e64541 tracing: Fix warning in trace_buffered_event_disable()
    d7b20279244f ring-buffer: Fix wrong stat of cpu_buffer->read
    f6e1e569ac97 ata: pata_ns87415: mark ns87560_tf_read static
    53c06e0d15ee dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths
    9ebcca93bd41 block: Fix a source code comment in include/uapi/linux/blkzoned.h
    c0aad2fe1b9f ASoC: fsl_spdif: Silence output on stop
    3bd1b4793b01 drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
    4970f72f810c drm/msm/adreno: Fix snapshot BINDLESS_DATA size
    5200bd7e6096 drm/msm/dpu: drop enum dpu_core_perf_data_bus_id
    4990f529b745 RDMA/mlx4: Make check for invalid flags stricter
    74843851d418 benet: fix return value check in be_lancer_xmit_workarounds()
    07d9723cef28 net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64
    2eb617529458 net/sched: mqprio: add extack to mqprio_parse_nlattr()
    29c5eb0ffac7 net/sched: mqprio: refactor nlattr parsing to a separate function
    17afc24d20c9 platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
    504177c84f04 team: reset team's flags when down link is P2P device
    a3bb02598db9 bonding: reset bond's flags when down link is P2P device
    d87d67c8bdd1 tcp: Reduce chance of collisions in inet6_hashfn().
    458294ee1537 ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address
    a249705862d7 ethernet: atheros: fix return value check in atl1e_tso_csum()
    195e806b2afb phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
    27b63e8b8552 vxlan: calculate correct header length for GPE
    5e98318c632d i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
    6b1ee62ecbf1 ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
    65bd66a794bf keys: Fix linking a duplicate key to a keyring's assoc_array
    c1df96689fe1 uapi: General notification queue definitions
    ea64c727f201 scsi: qla2xxx: Array index may go out of bound
    5e387df414f9 scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c
    629628738078 pwm: meson: fix handling of period/duty if greater than UINT_MAX
    7ae4671a868e pwm: meson: Simplify duplicated per-channel tracking
    8abacc57af7b pwm: meson: Remove redundant assignment to variable fin_freq
    680e1455b828 ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
    05ff1d355e0b ftrace: Store the order of pages allocated in ftrace_page
    e3098e52bf5a ftrace: Check if pages were allocated before calling free_pages()
    aad84a978841 ftrace: Add information on number of page groups allocated
    bd020c7763d6 fs: dlm: interrupt posix locks only when process is killed
    f61d5752aed0 dlm: rearrange async condition return
    ed092c495e29 dlm: cleanup plock_op vs plock_xop
    a50ad9f8c06c PCI/ASPM: Avoid link retraining race
    e50434e33de9 PCI/ASPM: Factor out pcie_wait_for_retrain()
    7411202a0fee PCI/ASPM: Return 0 or -ETIMEDOUT from pcie_retrain_link()
    8eb15ff216c1 ext4: Fix reusing stale buffer heads from last failed mounting
    0204319de8ea ext4: rename journal_dev to s_journal_dev inside ext4_sb_info
    356056cbe667 btrfs: fix extent buffer leak after tree mod log failure at split_node()
    63008dab58ad btrfs: fix race between quota disable and relocation
    0a55f346e0e5 btrfs: qgroup: catch reserved space leaks at unmount time
    b070f29a6143 bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent
    38a6dd2b68f9 bcache: remove 'int n' from parameter list of bch_bucket_alloc_set()
    edb81d6e1e50 gpio: tps68470: Make tps68470_gpio_output() always set the initial value
    34e71f7d3a03 jbd2: Fix wrongly judgement for buffer head removing while doing checkpoint
    937cb20746c8 jbd2: recheck chechpointing non-dirty buffer
    acc9a81f7cb2 jbd2: remove redundant buffer io error checks
    05d440d0f5da jbd2: fix kernel-doc markups
    b41fa1ed91de jbd2: fix incorrect code style

(From OE-Core rev: d6d1a9c20536d9f8abc60419eec93fec66496964)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Bruce Ashfield
b731a65e4f linux-yocto/5.4: update to v5.4.252
Updating  to the latest korg -stable release that comprises
the following commits:

    21732fd22497 Linux 5.4.252
    9399ea1ce481 x86: fix backwards merge of GDS/SRSO bit
    bc7b9a6c2ca4 xen/netback: Fix buffer overrun triggered by unusual packet
    43ed6f79b3e7 x86/cpu, kvm: Add support for CPUID_80000021_EAX
    1f0618bb2456 x86/bugs: Increase the x86 bugs vector size to two u32s
    08ba48152a8a tools headers cpufeatures: Sync with the kernel sources
    694b40dcfb41 x86/cpufeatures: Assign dedicated feature word for CPUID_0x8000001F[EAX]
    4fa849d4af68 x86/cpu: Add VM page flush MSR availablility as a CPUID feature
    998eec066607 x86/cpufeatures: Add SEV-ES CPU feature
    3e21d8b0f3a9 Documentation/x86: Fix backwards on/off logic about YMM support
    ad7670dd65cb x86/mm: Initialize text poking earlier
    979366f5c2aa mm: Move mm_cachep initialization to mm_init()
    3d1b8cfdd0c9 x86/mm: Use mm_alloc() in poking_init()
    ddcf05fe8850 x86/mm: fix poking_init() for Xen PV guests
    3f8968f1f0ad x86/xen: Fix secondary processors' FPU initialization
    e56c1e0f9134 KVM: Add GDS_NO support to KVM
    ed56430ab253 x86/speculation: Add Kconfig option for GDS
    e35c65794365 x86/speculation: Add force option to GDS mitigation
    f68f9f2df68e x86/speculation: Add Gather Data Sampling mitigation
    6e6044366897 x86/fpu: Move FPU initialization into arch_cpu_finalize_init()
    2ee37a46aa13 x86/fpu: Mark init functions __init
    77fe8150579c x86/fpu: Remove cpuinfo argument from init functions
    95356fff6fee init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init()
    7aa2cec22e28 init: Invoke arch_cpu_finalize_init() earlier
    944d5c3ffa4b init: Remove check_bugs() leftovers
    a03ef708788e um/cpu: Switch to arch_cpu_finalize_init()
    98c3955e145f sparc/cpu: Switch to arch_cpu_finalize_init()
    568d68fc1dd4 sh/cpu: Switch to arch_cpu_finalize_init()
    18cd611a3eaa mips/cpu: Switch to arch_cpu_finalize_init()
    2febb4a73004 m68k/cpu: Switch to arch_cpu_finalize_init()
    1f4494ea77e8 ia64/cpu: Switch to arch_cpu_finalize_init()
    73719e89e32b ARM: cpu: Switch to arch_cpu_finalize_init()
    1743bc756b6b x86/cpu: Switch to arch_cpu_finalize_init()
    afe787cf253b init: Provide arch_cpu_finalize_init()

(From OE-Core rev: 9255ec4beb9eaa6f5d4b8a51a6b2ac4e511309fc)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Alexander Kanavin
da06aaf910 nasm: update 2.15.03 -> 2.15.05
Use autotools-brokensep as new version needs that.

upgrade include fix for CVE-2020-21686 and CVE-2022-29654

(cherry picked from commit c9c724ffa36757b56e70bc8d7b880c0c5777b153)

(From OE-Core rev: ed262f94b81cbf78e6a335912875bee8a65ca7c6)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Lee Chee Yang
4d9612b31c python3: update to 3.8.18
https://docs.python.org/release/3.8.18/whatsnew/changelog.html#changelog

Release date: 2023-08-24

Security
gh-108310: Fixed an issue where instances of ssl.SSLSocket were
vulnerable to a bypass of the TLS handshake and included protections
(like certificate verification) and treating sent unencrypted data as if
it were post-handshake TLS encrypted data. Security issue reported as
CVE-2023-40217 by Aapo Oksman. Patch by Gregory P. Smith.

Library
gh-107845: tarfile.data_filter() now takes the location of symlinks into
account when determining their target, so it will no longer reject some
valid tarballs with LinkOutsideDestinationError.

Tools/Demos
gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL
1.1.1v, 3.0.10, and 3.1.2.

(From OE-Core rev: 9205496344bede4a16372ca7a02c2819a976640b)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Siddharth Doshi
cbb7afa601 go: Fix CVE-2023-39318 and CVE-2023-39319
Upstream-Status: Backport from [023b542edf]
CVE: CVE-2023-39318
Upstream-Status: Backport from [2070531d2f]
CVE: CVE-2023-39319
(From OE-Core rev: 8de380d765d8f47a961c6e45eba1cfa4d2feb68f)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Lee Chee Yang
f27e86a4d7 qemu: fix CVE-2020-24165
(From OE-Core rev: 93efa56fb87217035275dcb04c4a19b79b95ccaf)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Vijay Anusuri
16c91216f1 ghostscript: fix CVE-2023-36664
Artifex Ghostscript through 10.01.2 mishandles permission validation for
pipe devices (with the %pipe% prefix or the | pipe character prefix).

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2023-36664

Upstream commits:
https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=4ceaf92815302863a8c86fcfcf2347e0118dd3a5
https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=5e65eeae225c7d02d447de5abaf4a8e6d234fcea
https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=fb342fdb60391073a69147cb71af1ac416a81099

(From OE-Core rev: 13534218ec37706d9decca5b5bd0453e312d72b0)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Archana Polampalli
e62c723b0c nasm: fix CVE-2022-44370
NASM v2.16 was discovered to contain a heap buffer overflow in the
component quote_for_pmake() asm/nasm.c:856

References:
https://nvd.nist.gov/vuln/detail/CVE-2022-44370

Upstream patches:
2d4e695241

( cherry picked from commit 1568df72136f46f0767bba56c10c48bf2a1ec259 )

(From OE-Core rev: 91e716b75861f2a4acee58a0c3f95e511058f1dc)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:51 -10:00
Lee Chee Yang
fe546dca3f libxpm: fix CVE-2022-46285
(From OE-Core rev: bd594af20fce07908f8e0fb1765b0e0ccc641e86)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:50 -10:00
Colin McAllister
00722bacdd libwebp: Fix CVE-2023-5129
Add patch from libwebp 1.1.0 to fix CVE-2023-5129.

(From OE-Core rev: 2ab6568d35e3d68f77a73bf56eb2d38aa6ada236)

Signed-off-by: Colin McAllister <colinmca242@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:50 -10:00
Ashish Sharma
15854dc716 mdadm: Backport fix for CVE-2023-28736
(From OE-Core rev: fb37fa3661095b8ebe68c2ffa36aabf35da30b91)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-10-04 05:17:50 -10:00
Richard Purdie
f980ef9fec vim: Upgrade 9.0.1664 -> 9.0.1894
This includes multiple CVE fixes.

The license change is due to changes in maintainership, the license
itself is unchanged.

(From OE-Core rev: a9d194f21a3bdebca8aaff204804a5fdc67c76d1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 91e66b93a0c0928f0c2cfe78e22898a6c9800f34)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-29 04:29:01 -10:00
Archana Polampalli
994a224d40 vim: upgrade 9.0.1592 -> 9.0.1664
Fixes:
https://nvd.nist.gov/vuln/detail/CVE-2023-3896
8154e642a (tag: v9.0.1664) patch 9.0.1664: divide by zero when scrolling with 'smoothscroll' set

(From OE-Core rev: e9591ead43b70da5665f53f8a54f6e0c8f4d0dda)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4a1ab744142c9229f03a359b45e5e89a1fbae0d3)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-29 04:29:01 -10:00
Ross Burton
d32656ac24 gcc: Fix -fstack-protector issue on aarch64
This series of patches fixes deficiencies in GCC's -fstack-protector
implementation for AArch64 when using dynamically allocated stack space.
This is CVE-2023-4039.  See:

https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64
https://github.com/metaredteam/external-disclosures/security/advisories/GHSA-x7ch-h5rf-w2mf

for more details.

(From OE-Core rev: d411ef9f660c443c00eee9bfbbc8c60c3cd0e92d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-29 04:29:01 -10:00
Michael Opdenacker
669079e7c0 flac: fix CVE-2020-22219
Buffer Overflow vulnerability in function bitwriter_grow_ in flac before
1.4.0 allows remote attackers to run arbitrary code via crafted input to
the encoder.

(From OE-Core rev: 87d92cb3d20c2686caddaa29cd17e18850ad9484)

Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com>
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Tested-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-29 04:29:01 -10:00
Vijay Anusuri
ea9b55c858 go: Backport fix for CVE-2022-41725 and CVE-2023-24536
Upstream-commit:
874b3132a8
&
4e5a313524
&
5246fa5e75
&
5c55ac9bf1
&
ef41a4e2fa
&
7a359a651c
&
7917b5f312

(From OE-Core rev: 532eb2c57fb1817999a857fc71db4438717ccadb)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-29 04:29:01 -10:00
Siddharth Doshi
0734868d9d libxml2: Fix CVE-2023-39615
Upstream-Status: Backport from [d0c3f01e11, 235b15a590]
CVE: CVE-2023-39615
(From OE-Core rev: d8a585a8c3712cdce9d9a5241ae7e620bc014ed9)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-29 04:29:01 -10:00
Siddharth Doshi
007a6e2dad gdb: Fix CVE-2023-39128
Note: The Fix needs to be pushed in gdb rather than bintuils-gdb as we are
disabling gdb in binutils configure.

Upstream-Status: Backport from [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=033bc52bb6190393c8eed80925fa78cc35b40c6d]
CVE: CVE-2023-39128
(From OE-Core rev: c991fdbb63a6de754399ac4fe04288ea66d34c4d)

Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-29 04:29:01 -10:00
Steve Sakoman
926eb08fe3 build-appliance-image: Update to dunfell head revision
(From OE-Core rev: 8b91c463fb3546836789e1890b3c68acf69c162a)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-16 11:20:06 -10:00
Steve Sakoman
6d6d43248e poky.conf: bump version for 3.1.28
(From meta-yocto rev: fb227b9ff08a2cf5304348a57f574a6751741bce)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-16 11:16:08 -10:00
Ross Burton
b222a20f8f gawk: remove load-sensitive tests
The time and timeout tests are sensitive to system load, and as we run
these on build machines they fail randomly.

[ YOCTO #14371 ]

(From OE-Core rev: d2b62913a5771169265171129fe972c8e252fe04)

(From OE-Core rev: 309f1c6166f8535fa61fd1d01924df3c7fe9fbba)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a84b8d683b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-16 11:16:07 -10:00
Steve Sakoman
55b09cdc1c build-appliance-image: Update to dunfell head revision
(From OE-Core rev: a6dde75a3cbd99cb346a8ab8183e96752d005a6b)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:50:18 -10:00
Steve Sakoman
87f18a42d4 documentation: update for 3.1.28
(From yocto-docs rev: 628be0aa38ea9fe03cd4843278c201a0c4f6aa44)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Michael Opdenacker
3978003135 ref-manual: ref-system-requirements: update supported distros
- Update according to changes in SANITY_TESTED_DISTROS
  (meta-poky/conf/distro/poky.conf)

- No longer declare as "Supported" the distributions versions
  which are End of Life for their vendors, as some of them
  (Ubuntu for example) ship updates to subscribers only,
  which the Yocto Project has no access to.

- List distribution versions which were previously tested
  for the branch of the Yocto Project being considered.

(From yocto-docs rev: ed345f43ed1e5fcceeff5ab77aaa43763f08f598)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Richard Purdie
7fc94c93bf oeqa/runtime/ltp: Increase ltp test output timeout
On our slower arm server, the tests currently timeout leading to inconsistent test
results. Increase the timeout to avoid this and aim to make the test results
consistent.

(From OE-Core rev: 76b065b3e802fc7dfa9a370e273b8a4187072623)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9a8b49208f3c99e184eab426360b137bc773aa31)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Richard Purdie
02356ecdca oeqa/target/ssh: Ensure EAGAIN doesn't truncate output
We have a suspicion that the read() call may return EAGAIN on the non-blocking
fd and this may truncate test output leading to some of our intermittent failures.
Tweak the code to avoid this potential issue.

(From OE-Core rev: 605d832e86f249100adaf3761b4e1701401d0b76)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a8920c105725431e989cceb616bd04eaa52127ec)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Anuj Mittal
0cbec779f5 selftest/cases/glibc.py: switch to using NFS over TCP
This provides a more reliable test execution when running tests that
write a large buffer/file and significantly reduces the localedata test
failures.

(From OE-Core rev: 1f35336edf13496432fb68e7e048a5c137fc3e47)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 97a7612e3959bc9c75116a4e696f47cc31aea75d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Anuj Mittal
a1886b3532 oeqa/utils/nfs: allow requesting non-udp ports
Allows setting up NFS over TCP as well.

(From OE-Core rev: 148e009374dcbd2101223cf33f2ff69c75895b71)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e1ff9b9a3b7f7924aea67d2024581bea2e916036)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Anuj Mittal
9e2099f2a8 selftest/cases/glibc.py: increase the memory for testing
Some of the tests trigger OOM and fail. Increase the amount of memory
available so we dont run into these issues.

(From OE-Core rev: 50b07b4c0c814f2832816cf83863687155429b21)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4d22dba482cb19ffcff5abee73f24526ea9d1c2a)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Anuj Mittal
c3d7af5d16 glibc/check-test-wrapper: don't emit warnings from ssh
Dont fill up the test log with ssh warning about having added the host
to list of known hosts.

Also helps fix a test case failure where stderr log was being compared
to a known value.

(From OE-Core rev: 781c52bb8f9ffe6aeb456fb0c0d628917641fb22)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 63b31ff7e54a171c4c02fca2e6b07aec64a410af)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Staffan Rydén
a0615a08c5 kernel: Fix path comparison in kernel staging dir symlinking
Due to an oversight in the do_symlink_kernsrc function, the path
comparison between "S" and "STAGING_KERNEL_DIR" is broken. The code
obtains both variables, but modifies the local copy of "S" before
comparing them, causing the comparison to always return false.

This can cause the build to fail when the EXTERNALSRC flag is enabled,
since the code will try to create a symlink even if one already exists.

This patch resolves the issue by comparing the variables before they are
modified.

(From OE-Core rev: 27a982807caa7ffbdf2d4ef02bc0b037150b1b3b)

Signed-off-by: Staffan Rydén <staffan.ryden@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit afd2038ef8a66a5e6433be31a14e1eb0d9f9a1d3)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Michael Halstead
b347ccc7ce resulttool/resultutils: allow index generation despite corrupt json
non-release indexes will continue to generate when test output is
corrupted.

(From OE-Core rev: 31b996c01c72749fc62821a3c9d1da70540bfad6)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1a9157684a6bff8406c9bb470cb2e16ee006bbe9)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Michael Halstead
c58cd65c96 yocto-uninative: Update to 4.3
Add in stable updates to glibc 2.38 to fix malloc bugs

(From OE-Core rev: 2850119bce7aa9788ab8b163311d42ea273ca1df)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 39f987fcb20ad7c0e45425b9f508d463c50ce0c1)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Priyal Doshi
ea56bba866 rootfs-post: remove traling blanks from tasks
remove the traling blanks before the ;-delimiter, so one could use
"_remove" to avoid running tasks like 'rootfs_update_timestamp',
which are currently hardcoded and not bound to any
configurable feature flag

(From OE-Core rev: 18246f0bfedb5c729a0fc5b515f25a1ed0cde191)

Signed-off-by: Priyal Doshi <pdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Vijay Anusuri
1b52dc0663 qemu: Backport fix for CVE-2023-0330
A DMA-MMIO reentrancy problem may lead to memory corruption bugs
like stack overflow or use-after-free.

Summary of the problem from Peter Maydell:
https://lore.kernel.org/qemu-devel/CAFEAcA_23vc7hE3iaM-JVA6W38LK4hJoWae5KcknhPRD5fPBZA@mail.gmail.com

Reference:
https://gitlab.com/qemu-project/qemu/-/issues/556

qemu.git$ git log --no-merges --oneline   --grep CVE-2023-0330
b987718bbb hw/scsi/lsi53c895a: Fix reentrancy issues in the LSI controller (CVE-2023-0330)
a2e1753b80 memory: prevent dma-reentracy issues

Included second commit as well as commit log of a2e1753b80 says it
resolves CVE-2023-0330

(From OE-Core rev: 45ce9885351a2344737170e6e810dc67ab3e7ea9)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Ashish Sharma
b48424988a qemu: Backport fix CVE-2023-3180
Upstream-Status: Backport from [9d38a84347]
CVE: CVE-2023-3180
(From OE-Core rev: edbc17315927a711aa9fae7c6cfba61cbf8ab5ad)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Shubham Kulkarni
0485ee7a6b openssh: Securiry fix for CVE-2023-38408
The PKCS#11 feature in ssh-agent in OpenSSH before 9.3p2 has an
insufficiently trustworthy search path, leading to remote code
execution if an agent is forwarded to an attacker-controlled system.
(Code in /usr/lib is not necessarily safe for loading into ssh-agent.)
NOTE: this issue exists because of an incomplete fix for CVE-2016-10009.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-38408

Upstream patches:
https://github.com/openssh/openssh-portable/commit/dee22129, https://github.com/openssh/openssh-portable/commit/099cdf59,
https://github.com/openssh/openssh-portable/commit/29ef8a04, https://github.com/openssh/openssh-portable/commit/892506b1,
https://github.com/openssh/openssh-portable/commit/0c111eb8, https://github.com/openssh/openssh-portable/commit/52a03e9f,
https://github.com/openssh/openssh-portable/commit/1fe16fd6, https://github.com/openssh/openssh-portable/commit/e0e8bee8,
https://github.com/openssh/openssh-portable/commit/8afaa7d7, https://github.com/openssh/openssh-portable/commit/1a4b9275,
https://github.com/openssh/openssh-portable/commit/4c1e3ce8, https://github.com/openssh/openssh-portable/commit/1f2731f5.

(From OE-Core rev: 9242b8218858d2bebb3235929fea7e7235cd40f3)

Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Vijay Anusuri
90175073f6 bind: Backport fix for CVE-2023-2828
Upstream Patch: https://downloads.isc.org/isc/bind9/9.16.42/patches/0001-CVE-2023-2828.patch

LINK: https://security-tracker.debian.org/tracker/CVE-2023-2828

(From OE-Core rev: 1b9d661a82211d6ffdd56e366cfbc3f3c247fd1c)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-15 03:47:11 -10:00
Ross Burton
0121cb4bd1 linux/cve-exclusion: remove obsolete manual entries
The generated file covers all but two of these CVEs (which will be fixed
when [1] and [2] are resolved) so remove the redundant entries.

[1] https://github.com/nluedtke/linux_kernel_cves/issues/344
[2] https://github.com/nluedtke/linux_kernel_cves/issues/345

(From OE-Core rev: c953ccba6c2a334cc58a97eee073bdb51a68f1d3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-07 04:57:26 -10:00
Ross Burton
2f978be9e2 linux/cve-exclusion: add generated CVE_CHECK_WHITELISTs
Run generate-cve-exclusions.py to generate the ignore lists.  This file
is maintained separately from the existing manual whitelist entries.

(From OE-Core rev: b63743410e758ba116adb74a483b7c2d2aedf3b3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-07 04:57:26 -10:00
Ross Burton
471e51b18a linux-yocto: add script to generate kernel CVE_CHECK_WHITELIST entries
Instead of manually looking up new CVEs and determining what point
releases the fixes are incorporated into, add a script to generate the
CVE_CHECK_WHITELIST data automatically.

First, note that this is very much an interim solution until the
cve-check class fetches data from www.linuxkernelcves.com directly.

The script should be passed the path to a local clone of the
linuxkernelcves repository[1] and the kernel version number. It will
then write to standard output the CVE_STATUS entries for every known
kernel CVE.

The script should be periodically reran as CVEs are backported and
kernels upgraded frequently.

[1] https://github.com/nluedtke/linux_kernel_cves

Note: for the Dunfell backport this is not a cherry-pick of the commit
in master as the variable names are different. This incorporates the
following commits:

linux/generate-cve-exclusions: add version check warning
linux/generate-cve-exclusions.py: fix comparison
linux-yocto: add script to generate kernel CVE_STATUS entries

(From OE-Core rev: 496c0b8fab5dd87102c3a63656debdb3aa214ae7)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-07 04:57:25 -10:00
Vijay Anusuri
1a6ed0befd go: Backport fix for CVE-2023-29409
Upstream-commit: 2300f7ef07

(From OE-Core rev: 37212694b9a610b1086ef574673dd24095585f4a)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-07 04:57:25 -10:00
Vijay Anusuri
3fdec9fd90 inetutils: Backport fix for CVE-2023-40303
Upstream-commit: https://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=e4e65c03f4c11292a3e40ef72ca3f194c8bffdd6
& https://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=9122999252c7e21eb7774de11d539748e7bdf46d

(From OE-Core rev: 57f6d8548e778712eb11507e889f3eadf3732041)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-09-07 04:57:25 -10:00
Kai Kang
b1fdc92450 grub2.inc: remove '-O2' from CFLAGS
It fails to boot grub after upgrade grub to 2.06. According to
description in

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14367

it is introduced by a commit to fix CVE. So remove option '-O2' from
CFLAGS rather than revert the commit to avoid the failure.

[YOCTO #14367]

CC: Tony Battersby <tonyb@cybernetics.com>
(From OE-Core rev: 3575290c4cc937ae2f2c5604a5619ac6de9aa071)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 69805629b8f47fd46a37b7c5cc435982e2ac3d1d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:46 -10:00
Ross Burton
02cfe361d6 oeqa/runtime/cases/rpm: fix wait_for_no_process_for_user failure case
str.format() doesn't use % notation, update the formatting to work.

assertTrue() is a member of self not a global, and assertTrue(True) will
always pass. Change this to just self.fail() as this is the failure case.

(From OE-Core rev: 2be0f2c62fb893f093091cbb30967f32f9d3165b)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 017f3a0b1265c1a3b69c20bdb56bbf446111977e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:46 -10:00
Yoann Congal
8ae48ddf5e recipetool: Fix inherit in created -native* recipes
native and nativesdk classes are special and must be inherited last :
put them at the end of the gathered classes to inherit.

(From OE-Core rev: cdc671271327ca61e5321b8890921d08ecd8799d)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a6614fd800cbe791264aeb102d379ba79bd145c2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Michael Halstead
9fa49f817d yocto-uninative: Update to 4.2 for glibc 2.38
Uninative 4.2 adds glibc 2.38.

(From OE-Core rev: 35baf2ceb02ca14520a18a1dcd5014c5f7937e30)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c6654fab00a1b4e4bb05eec8b77c8c60e1f8a709)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Michael Halstead
84c0692d57 yocto-uninative: Update hashes for uninative 4.1
This version includes fixes to patchelf.

(From OE-Core rev: 600ef23e30c27b4ec0f54c9b03d6386bccd5390f)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1c5c8ff97ba0a7f9adc592d702b865b3d166a24b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Dmitry Baryshkov
b1f23e404c linux-firmware: split platform-specific Adreno shaders to separate packages
For newest Qualcomm platforms the firmware for the Adreno GPU consists
of two parts: platform-independent SQE/GMU/GPMU/PFP/PM4 and
platform-specific ZAP shader, which is used during the boot process. As
the platform-independent parts can be shared between different
platforms, split the platform-specific part to the separate package.

(From OE-Core rev: 3ae53403b019b699f59c3ab9ba7b822041773dc7)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit bf00a042d2fa2eb4b20d8c5982926758821bf990)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
BELOUARGA Mohamed
b4da5c4df4 linux-firmware : Add firmware of RTL8822 serie
RTL8822 is a serie of wireless modules that need firmwares to function correctly.
The linux firmware recipe does not have a package of these firmwares, and this commit add them.

(From OE-Core rev: f1a4db02831e70782a896b699cc2fa427cbd8e62)

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6459959beeb91c0b694f5f17b6587a12c6dcb087)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Dmitry Baryshkov
c06bf61270 linux-firmware: package firmare for Dragonboard 410c
Latest linux-firmware archive inclues firmware for the Dragonboard 410c
device (Qualcomm apq8016 SBC). Follow the rest of linux-firmware-qcom-*
packages as a template and create packages for the new firmware files.

(From OE-Core rev: 0f4582034a41f4abc746bffe5892a8d393a5a8f7)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 380216e8d3b63d563ebfb10445fc6eb5e77eb9f2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Trevor Gamblin
827548d7f7 linux-firmware: upgrade 20230515 -> 20230625
WHENCE checksum changed because of updated version lists and removal of
information for the RTL8188EU driver.

(From OE-Core rev: ecfb64079c7426606263780e04799b811c51fe91)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 986f8ca9d4c2c22d368f69e65b2ab76d661edca0)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Wang Mingyu
c314fe22fd libnss-nis: upgrade 3.1 -> 3.2
Changelog:
* Do not call malloc_usable_size

(From OE-Core rev: 143389388bf3a1d9e1407fe5c42fb6bd341a81b8)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5cd967503c0574f45b814572da9503182556b431)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Chee Yang Lee
6351d145ba tiff: CVE-2022-3599.patch also fix CVE-2022-4645 CVE-2023-30774
The same patch also fix CVE-2022-4645 CVE-2023-30774
CVE-2022-4645 - https://gitlab.com/libtiff/libtiff/-/issues/277
CVE-2023-30774 - https://gitlab.com/libtiff/libtiff/-/issues/463

(From OE-Core rev: 8a4f312ef3751ecf8b3fe2ac719477c7d9c967d2)

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Vijay Anusuri
268614c13d elfutils: Backport fix for CVE-2021-33294
Upstream-Status: Backport from https://sourceware.org/git/?p=elfutils.git;a=commit;h=480b6fa3662ba8ffeee274bf0d37423413c01e55

Reference
https://nvd.nist.gov/vuln/detail/CVE-2021-33294
https://sourceware.org/bugzilla/show_bug.cgi?id=27501

(From OE-Core rev: 9cd6fea32edf8e4da0c33547e1df6d1ec81b350d)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Ashish Sharma
d148690f1d curl: Backport fix CVE-2023-32001
(From OE-Core rev: 71ed22673545fc2bca5ac599416ecb42eb2781f8)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-27 10:54:45 -10:00
Michael Opdenacker
bce2280258 poky.conf: update SANITY_TESTED_DISTROS to match autobuilder
From the intersection of the list of allowed workers
on https://git.yoctoproject.org/yocto-autobuilder2/tree/config.py
and the active workers on
https://autobuilder.yoctoproject.org/typhoon/#/workers

(From meta-yocto rev: eed6f8cd486d9dee764f20d967f07902288e7c65)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Abdellatif El Khlifi
995f3a6243 kernel: skip installing fitImage when using Initramfs bundles
When including an initramfs bundle inside a FIT image, the fitImage is created
after the install task by do_assemble_fitimage_initramfs.

This happens after the generation of the initramfs bundle
(done by do_bundle_initramfs).

So, at the level of the install task we should not try to install the fitImage.
The fitImage is still not generated yet.

After the generation of the fitImage, the deploy task copies the fitImage from
the build directory to the deploy folder.

Change-Id: I3eaa6bba1412f388f710fa0f389f66631c1c4826
(From OE-Core rev: b70a8333a7467162b9d148b99f5970c0af2a531f)

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1b67fd9ac74935fa41e960478c54e45422339138)
Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Yuta Hayama
98d8fdd7ea systemd-systemctl: fix errors in instance name expansion
If the instance name indicated by %i begins with a number, the meaning of the
replacement string "\\1{}".format(instance) is ambiguous.

To indicate group number 1 regardless of the instance name, use "\g<1>".

(From OE-Core rev: d18b939fb08b37380ce95934da38e6522392621c)

(From OE-Core rev: 682e094e6af67e67873f7f08dd8d52b40fcdbded)

Signed-off-by: Yuta Hayama <hayama@lineo.co.jp>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Marek Vasut
6b17a4af6a linux-firmware: Fix mediatek mt7601u firmware path
The following linux-firmware commit moved the mt7601u firmware blob
into a mediatek/ subdirectory, update the path accordingly.
8451c2b1 ("mt76xx: Move the old Mediatek WiFi firmware to mediatek")

(From OE-Core rev: 6fa5c4967a7e70192e9233c92534f27ec3e394c8)

Fixes: 64603f602d ("linux-firmware: upgrade 20230404 -> 20230515")
(From OE-Core rev: 2d56adfd53b0ea3b938c60bf57fd40f3d48b5c68)

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Peter Marko
5e47346311 openssl: Upgrade 1.1.1t -> 1.1.1v
https://www.openssl.org/news/openssl-1.1.1-notes.html
Major changes between OpenSSL 1.1.1u and OpenSSL 1.1.1v [1 Aug 2023]
* Fix excessive time spent checking DH q parameter value (CVE-2023-3817)
* Fix DH_check() excessive time with over sized modulus (CVE-2023-3446)
Major changes between OpenSSL 1.1.1t and OpenSSL 1.1.1u [30 May 2023]
* Mitigate for very slow `OBJ_obj2txt()` performance with gigantic OBJECT IDENTIFIER sub-identities. (CVE-2023-2650)
* Fixed documentation of X509_VERIFY_PARAM_add0_policy() (CVE-2023-0466)
* Fixed handling of invalid certificate policies in leaf certificates (CVE-2023-0465)
* Limited the number of nodes created in a policy tree ([CVE-2023-0464])

All CVEs for upgrade to 1.1.1u were already patched, so effectively
this will apply patches for CVE-2023-3446 and CVE-2023-3817 plus
several non-CVE fixes.

Because of mips build changes were backported to openssl 1.1.1 branch,
backport of a patch from kirkstone is necessary.

(From OE-Core rev: be5d49d86553769deaf4754969d2cf6931d6ac34)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Bruce Ashfield
d76406934a linux-yocto/5.4: update to v5.4.251
Updating  to the latest korg -stable release that comprises
the following commits:

    887433e4bc93 Linux 5.4.251
    1e02fbe4f0ed tracing/histograms: Return an error if we fail to add histogram to hist_vars list
    b1062596556e tcp: annotate data-races around fastopenq.max_qlen
    21c325d01ecc tcp: annotate data-races around tp->notsent_lowat
    7175277b4d0b tcp: annotate data-races around rskq_defer_accept
    3121d649e4c6 tcp: annotate data-races around tp->linger2
    b1cd5655fc13 net: Replace the limit of TCP_LINGER2 with TCP_FIN_TIMEOUT_MAX
    8ce44cf35ef6 tcp: annotate data-races around tp->tcp_tx_delay
    c822536b3e41 netfilter: nf_tables: can't schedule in nft_chain_validate
    caa228792fb5 netfilter: nf_tables: fix spurious set element insertion failure
    b8944e53ee70 llc: Don't drop packet from non-root netns.
    b07e31824df6 fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
    6d39e9fc5934 Revert "tcp: avoid the lookup process failing to get sk in ehash table"
    0c0bd9789a8d net:ipv6: check return value of pskb_trim()
    17046107ca15 iavf: Fix use-after-free in free_netdev
    765e1eaf42de net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
    3b6f56021af6 pinctrl: amd: Use amd_pinconf_set() for all config options
    951f4e9730f1 fbdev: imxfb: warn about invalid left/right margin
    3e03319ab97d spi: bcm63xx: fix max prepend length
    c9f56f3c7bc9 igb: Fix igb_down hung on surprise removal
    7d80e834625c wifi: iwlwifi: mvm: avoid baid size integer overflow
    41d149376078 wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point()
    970c7035f4b0 devlink: report devlink_port_type_warn source device
    e09a285ea1e8 bpf: Address KCSAN report on bpf_lru_list
    cec1857b1ea5 sched/fair: Don't balance task to its current running CPU
    9d8d3df71516 arm64: mm: fix VA-range sanity check
    8ad6679a5bb9 posix-timers: Ensure timer ID search-loop limit is valid
    d0345f7c7dbc md/raid10: prevent soft lockup while flush writes
    09539f9e2076 md: fix data corruption for raid456 when reshape restart while grow up
    4181c30a2c55 nbd: Add the maximum limit of allocated index in nbd_dev_add
    d4f1cd9b9d66 debugobjects: Recheck debug_objects_enabled before reporting
    0afcebcec057 ext4: correct inline offset when handling xattrs in inode body
    5d580017bdb9 drm/client: Fix memory leak in drm_client_modeset_probe
    52daf6ba2e0d drm/client: Fix memory leak in drm_client_target_cloned
    9533dbfac0ff can: bcm: Fix UAF in bcm_proc_show()
    5dd838be69e4 selftests: tc: set timeout to 15 minutes
    7f83199862c2 fuse: revalidate: don't invalidate if interrupted
    ae91ab710d8e btrfs: fix warning when putting transaction with qgroups enabled after abort
    e217a3d19e10 perf probe: Add test for regression introduced by switch to die_get_decl_file()
    380c7ceabdde drm/atomic: Fix potential use-after-free in nonblocking commits
    b7084ebf4f54 scsi: qla2xxx: Remove unused nvme_ls_waitq wait queue
    3f22f9ddbb29 scsi: qla2xxx: Pointer may be dereferenced
    a1c5149a82de scsi: qla2xxx: Correct the index of array
    1b7e5bdf2be2 scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
    4f90a8b04816 scsi: qla2xxx: Fix potential NULL pointer dereference
    d25fded78d88 scsi: qla2xxx: Wait for io return on terminate rport
    056fd1820724 tracing/probes: Fix not to count error code to total length
    93114cbc7cb1 tracing: Fix null pointer dereference in tracing_err_log_open()
    597eb52583d4 xtensa: ISS: fix call to split_if_spec
    e84829522fc7 ring-buffer: Fix deadloop issue on reading trace_pipe
    481535905608 tracing/histograms: Add histograms to hist_vars if they have referenced variables
    46574e5a0a2a tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk
    30962268fa1a tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() in case of error
    0697a1a592c7 Revert "8250: add support for ASIX devices with a FIFO bug"
    45e55e9cac13 meson saradc: fix clock divider mask length
    2cdced57bc00 ceph: don't let check_caps skip sending responses for revoke msgs
    1883a484c87e hwrng: imx-rngc - fix the timeout for init and self check
    e3373e6b6c79 firmware: stratix10-svc: Fix a potential resource leak in svc_create_memory_pool()
    826c7bfe5c49 serial: atmel: don't enable IRQs prematurely
    15d4bd0f0a6b drm/rockchip: vop: Leave vblank enabled in self-refresh
    6bc6ec8b0a0b drm/atomic: Allow vblank-enabled + self-refresh "disable"
    f86942709b0e fs: dlm: return positive pid value for F_GETLK
    ecfd1f82c4f5 md/raid0: add discard support for the 'original' layout
    dac4afa3efae misc: pci_endpoint_test: Re-init completion for every test
    dd2210379205 misc: pci_endpoint_test: Free IRQs before removing the device
    9cfa4ef25de5 PCI: rockchip: Set address alignment for endpoint mode
    35aec6bc0c04 PCI: rockchip: Use u32 variable to access 32-bit registers
    13b93891308c PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core
    c049b20655f6 PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked
    a1f311d430f2 PCI: rockchip: Write PCI Device ID to correct register
    592795119f2b PCI: rockchip: Assert PCI Configuration Enable bit after probe
    35c95eda7b6d PCI: qcom: Disable write access to read only registers for IP v2.3.3
    b0aac7792525 PCI: Add function 1 DMA alias quirk for Marvell 88SE9235
    f450388d8b6d PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold
    a4855aeb13e4 jfs: jfs_dmap: Validate db_l2nbperpage while mounting
    ee2fd448608e ext4: only update i_reserved_data_blocks on successful block allocation
    02543d1ddd77 ext4: fix wrong unit use in ext4_mb_clear_bb
    96a85becb811 erofs: fix compact 4B support for 16k block size
    42725e5c1b18 SUNRPC: Fix UAF in svc_tcp_listen_data_ready()
    29a560437f67 misc: fastrpc: Create fastrpc scalar with correct buffer count
    b157987242bd powerpc: Fail build if using recordmcount with binutils v2.37
    2b59740ebc86 net: bcmgenet: Ensure MDIO unregistration has clocks enabled
    1fe96568e78b mtd: rawnand: meson: fix unaligned DMA buffers handling
    86b9820395f2 tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
    96a16069a81d pinctrl: amd: Only use special debounce behavior for GPIO 0
    6dcb493fc478 pinctrl: amd: Detect internal GPIO0 debounce handling
    a1a443651569 pinctrl: amd: Fix mistake in handling clearing pins at startup
    cf57a0853ba5 net/sched: make psched_mtu() RTNL-less safe
    96391959a99e net/sched: flower: Ensure both minimum and maximum ports are specified
    166fa538e0dd cls_flower: Add extack support for src and dst port range options
    aadca5f08aef wifi: airo: avoid uninitialized warning in airo_get_rate()
    cc2c06ca7fbf erofs: avoid infinite loop in z_erofs_do_read_page() when reading beyond EOF
    b55c38fe2441 platform/x86: wmi: Break possible infinite loop when parsing GUID
    cb8a256202b9 platform/x86: wmi: move variables
    669c488cb25a platform/x86: wmi: use guid_t and guid_equal()
    fd8049d6553f platform/x86: wmi: remove unnecessary argument
    4c8e26fc3302 platform/x86: wmi: Fix indentation in some cases
    8717326e4362 platform/x86: wmi: Replace UUID redefinitions by their originals
    c7eeba470585 ipv6/addrconf: fix a potential refcount underflow for idev
    7a06554214fe NTB: ntb_tool: Add check for devm_kcalloc
    88e243618e4c NTB: ntb_transport: fix possible memory leak while device_register() fails
    b5b9e041eb04 ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
    0ae4fac8fe33 NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
    bb17520c0383 ntb: idt: Fix error handling in idt_pci_driver_init()
    4e64ef41c6cf udp6: fix udp6_ehashfn() typo
    61b4c4659746 icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().
    4c7276a6daf7 ionic: remove WARN_ON to prevent panic_on_warn
    3e77647acdcf ionic: ionic_intr_free parameter change
    f0dc38bdef52 ionic: move irq request to qcq alloc
    7cf21fba1bf8 ionic: clean irq affinity on queue deinit
    ef7fc26b6a19 ionic: improve irq numa locality
    808211a8d427 net/sched: cls_fw: Fix improper refcount update leads to use-after-free
    d98ac5bce2d5 net: mvneta: fix txq_map in case of txq_number==1
    58cd168825b4 scsi: qla2xxx: Fix error code in qla2x00_start_sp()
    b49b55a7d578 igc: set TP bit in 'supported' and 'advertising' fields of ethtool_link_ksettings
    a45afb07121c igc: Remove delay during TX ring configuration
    59c190082a01 drm/panel: simple: Add connector_type for innolux_at043tn24
    64b76abfe32d drm/panel: Add and fill drm_panel type field
    362940f8e40f drm/panel: Initialise panel dev and funcs through drm_panel_init()
    6d5172a3ab8f workqueue: clean up WORK_* constant types, clarify masking
    003d33924911 net: lan743x: Don't sleep in atomic context
    373b9475ea8c block/partition: fix signedness issue for Amiga partitions
    22df19fee7b9 tty: serial: fsl_lpuart: add earlycon for imx8ulp platform
    b7d636c924eb netfilter: nf_tables: prevent OOB access in nft_byteorder_eval
    61c7a5256543 netfilter: conntrack: Avoid nf_ct_helper_hash uses after free
    565bdccdded3 netfilter: nf_tables: fix scheduling-while-atomic splat
    7c4610ac3b41 netfilter: nf_tables: unbind non-anonymous set if rule construction fails
    90d54ee329d2 netfilter: nf_tables: reject unbound anonymous set before commit phase
    1df28fde1270 netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
    1adb5c272b20 netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
    077ef851f0a3 netfilter: nf_tables: add rescheduling points during loop detection walks
    11352851944c netfilter: nf_tables: use net_generic infra for transaction data
    d59ed9dc0058 netfilter: add helper function to set up the nfnetlink header and use it
    fa498dead9ee netfilter: nftables: add helper function to set the base sequence number
    ef35dd70a340 netfilter: nf_tables: fix nat hook table deletion
    d1b7fe307c75 block: add overflow checks for Amiga partition support
    2b71cbf7ab48 fanotify: disallow mount/sb marks on kernel internal pseudo fs
    9a6ce27a5d61 fs: no need to check source
    c1c41cda0ab1 ARM: orion5x: fix d2net gpio initialization
    679c34821ab7 btrfs: fix race when deleting quota root from the dirty cow roots list
    f0fbbd405a94 fs: Lock moved directories
    b97ac51f8492 fs: Establish locking order for unrelated directories
    d95dc41ad181 Revert "f2fs: fix potential corruption when moving a directory"
    a9a926423a63 ext4: Remove ext4 locking of moved directory
    eefebf8877d3 fs: avoid empty option when generating legacy mount string
    e9a3310bc2fc jffs2: reduce stack usage in jffs2_build_xattr_subsystem()
    a249a61ac528 integrity: Fix possible multiple allocation in integrity_inode_get()
    0729029e6472 bcache: Remove unnecessary NULL point check in node allocations
    4be68f1c7076 mmc: sdhci: fix DMA configure compatibility issue when 64bit DMA mode is used.
    2f6c76994646 mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M
    c491e27151c1 mmc: core: disable TRIM on Kingston EMMC04G-M627
    ce7278dedab7 NFSD: add encoding of op_recall flag for write delegation
    5016511287dc ALSA: jack: Fix mutex call in snd_jack_report()
    c64fda48a3ad i2c: xiic: Don't try to handle more interrupt events after error
    696e470e910e i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process()
    498962715773 sh: dma: Fix DMA channel offset calculation
    58b1b3c54e16 net: dsa: tag_sja1105: fix MAC DA patching from meta frames
    67a67e258407 net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX
    ab0085bd7902 xsk: Honor SO_BINDTODEVICE on bind
    9347e432297e xsk: Improve documentation for AF_XDP
    e63dc31b9452 tcp: annotate data races in __tcp_oow_rate_limited()
    e9c2687988b7 net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
    fffa51e786ce powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y
    45b34500f3ef f2fs: fix error path handling in truncate_dnode()
    860d9b717f65 mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
    398e6a015877 spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
    18d50fb44109 Add MODULE_FIRMWARE() for FIRMWARE_TG357766.
    4d8fc6137749 sctp: fix potential deadlock on &net->sctp.addr_wq_lock
    999ff7fe492b rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
    d5c39cca4d03 pwm: sysfs: Do not apply state to already disabled PWMs
    5375c024f8ae pwm: imx-tpm: force 'real_period' to be zero in suspend
    d252c74b8b7a mfd: stmpe: Only disable the regulators if they are enabled
    d9db18addf42 KVM: s390: vsie: fix the length of APCB bitmap
    baec796723b7 mfd: stmfx: Fix error path in stmfx_chip_init
    5d26f134efa8 serial: 8250_omap: Use force_suspend and resume for system suspend
    337073cacad4 mfd: intel-lpss: Add missing check for platform_get_resource
    0a6afc83b028 usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()
    becd09685d44 KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes
    151b0dd6d1a0 mfd: rt5033: Drop rt5033-battery sub-device
    8e8dae8eb230 usb: hide unused usbfs_notify_suspend/resume functions
    fe9cdc198619 usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
    1531ba3fab51 extcon: Fix kernel doc of property capability fields to avoid warnings
    257daec29dcd extcon: Fix kernel doc of property fields to avoid warnings
    648a163cff21 usb: dwc3: qcom: Fix potential memory leak
    d485150c9a52 media: usb: siano: Fix warning due to null work_func_t function pointer
    619e6f9a564a media: videodev2.h: Fix struct v4l2_input tuner index comment
    e9586c49bdd4 media: usb: Check az6007_read() return value
    fd869bdb5f12 sh: j2: Use ioremap() to translate device tree address into kernel memory
    85f4c53849e4 w1: fix loop in w1_fini()
    dc88382c1d44 block: change all __u32 annotations to __be32 in affs_hardblocks.h
    fa8548d1a0a4 block: fix signed int overflow in Amiga partition support
    bec218258cbd usb: dwc3: gadget: Propagate core init errors to UDC during pullup
    f55127df9918 USB: serial: option: add LARA-R6 01B PIDs
    bac502cd472a hwrng: st - keep clock enabled while hwrng is registered
    071560202a52 hwrng: st - Fix W=1 unused variable warning
    18fa56ca4cb8 NFSv4.1: freeze the session table upon receiving NFS4ERR_BADSESSION
    c182d87c67e2 ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard
    02dc8e8bdbe4 modpost: fix off by one in is_executable_section()
    1030c0c30968 crypto: marvell/cesa - Fix type mismatch warning
    ad3c4ecff00b modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}
    084bf580019c modpost: fix section mismatch message for R_ARM_ABS32
    c893658d9ce6 crypto: nx - fix build warnings when DEBUG_FS is not enabled
    a43bcb0b661c hwrng: virtio - Fix race on data_avail and actual data
    b70315e44f03 hwrng: virtio - always add a pending request
    102a354d52ca hwrng: virtio - don't waste entropy
    f2a7dfd35f0c hwrng: virtio - don't wait on cleanup
    6fe732764a58 hwrng: virtio - add an internal buffer
    2cbfb51d2c7e powerpc/mm/dax: Fix the condition when checking if altmap vmemap can cross-boundary
    aa3932eb0739 pinctrl: at91-pio4: check return value of devm_kasprintf()
    e297350c33f6 perf dwarf-aux: Fix off-by-one in die_get_varname()
    7f822c8036fe pinctrl: cherryview: Return correct value if pin in push-pull mode
    1768e362f20f PCI: Add pci_clear_master() stub for non-CONFIG_PCI
    5d3955bc32d4 PCI: ftpci100: Release the clock resources
    331dce61c0d4 PCI: pciehp: Cancel bringup sequence if card is not present
    f58c8563686b scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()
    666e7f9d60ce PCI/ASPM: Disable ASPM on MFD function removal to avoid use-after-free
    961c8370c5f7 scsi: qedf: Fix NULL dereference in error handling
    6f64558b43cf ASoC: imx-audmix: check return value of devm_kasprintf()
    35455616110b clk: keystone: sci-clk: check return value of kasprintf()
    ffe6ad17cf14 clk: cdce925: check return value of kasprintf()
    5f13d67027fa ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer
    801c8341f7af clk: tegra: tegra124-emc: Fix potential memory leak
    262db3ff58e2 drm/radeon: fix possible division-by-zero errors
    cacc0506e571 drm/amdkfd: Fix potential deallocation of previously deallocated memory.
    9e3858f82e3c fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()
    5541d1856c87 arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1
    40ac5cb6cbb0 IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
    68e0033dee72 soc/fsl/qe: fix usb.c build errors
    b756eb5eb9b0 ASoC: es8316: Do not set rate constraints for unsupported MCLKs
    d1c1ca27cac0 ASoC: es8316: Increment max value for ALC Capture Target Volume control
    b54bac970b54 memory: brcmstb_dpfe: fix testing array offset after use
    f54142ed16b5 ARM: ep93xx: fix missing-prototype warnings
    c2324c5aa247 drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H
    4a23954279fc arm64: dts: qcom: msm8916: correct camss unit address
    97dcb8dfefaa ARM: dts: gta04: Move model property out of pinctrl node
    25bbd1c7bef8 RDMA/bnxt_re: Fix to remove an unnecessary log
    ed039ad88ab0 drm: sun4i_tcon: use devm_clk_get_enabled in `sun4i_tcon_init_clocks`
    87ccaf56097a Input: adxl34x - do not hardcode interrupt trigger type
    c7a8cc9140cf ARM: dts: BCM5301X: Drop "clock-names" from the SPI node
    c516c00847f5 Input: drv260x - sleep between polling GO bit
    3e789aee218b radeon: avoid double free in ci_dpm_init()
    bc5b57a23087 netlink: Add __sock_i_ino() for __netlink_diag_dump().
    1c405b3d3769 ipvlan: Fix return value of ipvlan_queue_xmit()
    1d2ab3d4383e netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
    337fdce45063 netfilter: conntrack: dccp: copy entire header to stack buffer, not just basic one
    32deadf89430 lib/ts_bm: reset initial match offset for every block of text
    dd6ff3f38627 net: nfc: Fix use-after-free caused by nfc_llcp_find_local
    edc5d8776a32 nfc: llcp: simplify llcp_sock_connect() error paths
    9c9662e2512b gtp: Fix use-after-free in __gtp_encap_destroy().
    08d8ff1bc688 selftests: rtnetlink: remove netdevsim device after ipsec offload test
    bd1de6107f10 netlink: do not hard code device address lenth in fdb dumps
    8f6652ed2ad9 netlink: fix potential deadlock in netlink_set_err()
    88d89b4a3102 wifi: ath9k: convert msecs to jiffies where needed
    76d5bda2c3af wifi: cfg80211: rewrite merging of inherited elements
    e4c33144fc75 wifi: iwlwifi: pull from TXQs with softirqs disabled
    2ba902da9090 rtnetlink: extend RTEXT_FILTER_SKIP_STATS to IFLA_VF_INFO
    786e264b37d2 wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key()
    68305a19bada memstick r592: make memstick_debug_get_tpc_name() static
    6f4454ccbea9 kexec: fix a memory leak in crash_shrink_memory()
    4503261ab97b watchdog/perf: more properly prevent false positives with turbo modes
    d5fa3918dfce watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config
    7874fb3bef8b wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown
    4dc3560561a0 wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes
    f432198058a6 wifi: ray_cs: Fix an error handling path in ray_probe()
    8fe51dce8bdc wifi: ray_cs: Drop useless status variable in parse_addr()
    0dec0ad304d4 wifi: ray_cs: Utilize strnlen() in parse_addr()
    ee73ad566a29 wifi: wl3501_cs: Fix an error handling path in wl3501_probe()
    b7df4e0cb4ed wl3501_cs: use eth_hw_addr_set()
    24f34f67be24 net: create netdev->dev_addr assignment helpers
    dd5dca10d806 wl3501_cs: Fix misspelling and provide missing documentation
    051d70773b9c wl3501_cs: Remove unnecessary NULL check
    91c3c9eaf1ed wl3501_cs: Fix a bunch of formatting issues related to function docs
    add539f7d16b wifi: atmel: Fix an error handling path in atmel_probe()
    5b06f702805d wifi: orinoco: Fix an error handling path in orinoco_cs_probe()
    ca4a2955d866 wifi: orinoco: Fix an error handling path in spectrum_cs_probe()
    91c3325da240 regulator: core: Streamline debugfs operations
    1bb38ef697e4 regulator: core: Fix more error checking for debugfs_create_dir()
    6ca0c94f2b02 nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()
    66a1be74230b nfc: constify several pointers to u8, char and sk_buff
    fea2104e752a wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()
    bc5099512057 spi: spi-geni-qcom: Correct CS_TOGGLE bit in SPI_TRANS_CFG
    f394d204d640 samples/bpf: Fix buffer overflow in tcp_basertt
    90e3c1017757 wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
    be3989d93be3 wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation
    717e4277ddf7 ima: Fix build warnings
    8430a8e8e854 pstore/ram: Add check for kstrdup
    540cdd720772 evm: Complete description of evm_inode_setattr()
    568b73406d93 ARM: 9303/1: kprobes: avoid missing-declaration warnings
    ba6da16eefb1 powercap: RAPL: Fix CONFIG_IOSF_MBI dependency
    c97460ce1f7c PM: domains: fix integer overflow issues in genpd_parse_state()
    54cc10a0f4b0 clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
    38ca169d66c3 clocksource/drivers/cadence-ttc: Use ttc driver as platform driver
    8af3b8d770da tracing/timer: Add missing hrtimer modes to decode_hrtimer_mode().
    7b0c664541cd irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
    d244927e350e irqchip/jcore-aic: Kill use of irq_create_strict_mappings()
    be481881753b md/raid10: fix io loss while replacement replace rdev
    45fa023b3334 md/raid10: fix null-ptr-deref of mreplace in raid10_sync_request
    31c805a44b75 md/raid10: fix wrong setting of max_corr_read_errors
    283f4a63fee3 md/raid10: fix overflow of md/safe_mode_delay
    b0b971fe7d61 md/raid10: check slab-out-of-bounds in md_bitmap_get_counter
    484104918305 x86/resctrl: Only show tasks' pid in current pid namespace
    7206eca1ac44 x86/resctrl: Use is_closid_match() in more places
    6f2bb37da468 bgmac: fix *initial* chip reset to support BCM5358
    794bfb6fd992 drm/amdgpu: Validate VM ioctl flags.
    2a4cfd5b0354 scripts/tags.sh: Resolve gtags empty index generation
    fff826d665f9 drm/i915: Initialise outparam for error return from wait_for_register
    99036f1aed7e HID: wacom: Use ktime_t rather than int when dealing with timestamps
    815c95d82b79 fbdev: imsttfb: Fix use after free bug in imsttfb_probe
    a7c8d2f3753d video: imsttfb: check for ioremap() failures
    f042d80a631f x86/smp: Use dedicated cache-line for mwait_play_dead()
    23f98fe887ce gfs2: Don't deref jdesc in evict

(From OE-Core rev: 9d509daf5fdae6b5dd8a81490ee40ea119a42024)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Bruce Ashfield
9ffd5243e9 linux-yocto/5.4: update to v5.4.250
Updating  to the latest korg -stable release that comprises
the following commits:

    27745d94abe1 Linux 5.4.250
    00363ef30797 x86/cpu/amd: Add a Zenbleed fix
    92b292bed627 x86/cpu/amd: Move the errata checking functionality up
    4d4112e2845c x86/microcode/AMD: Load late on both threads too

(From OE-Core rev: 55f3f04896f1c301bbc7e18360ac05ff583b7a1d)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Bruce Ashfield
e33ce6f1af linux-yocto/5.4: update to v5.4.249
Updating  to the latest korg -stable release that comprises
the following commits:

    b30db4f7e45f Linux 5.4.249
    c87439055174 xfs: verify buffer contents when we skip log replay
    72ab3d39b443 mm: make wait_on_page_writeback() wait for multiple pending writebacks
    9ea42ba3e695 mm: fix VM_BUG_ON(PageTail) and BUG_ON(PageWriteback)
    dffd25725e99 i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
    f89bcf03e90c x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
    a43c763f9cbe drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
    45f574d8dfc1 drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
    c81a542e45a0 drm/exynos: vidi: fix a wrong error return
    948b8b5fd0f3 ARM: dts: Fix erroneous ADS touchscreen polarities
    8d6f9f5f3bfc ASoC: nau8824: Add quirk to active-high jack-detect
    d6fd1b3f7648 s390/cio: unregister device when the only path is gone
    0de32d3dd39d usb: gadget: udc: fix NULL dereference in remove()
    823dd7de8213 nfcsim.c: Fix error checking for debugfs_create_dir
    c32b39d0707b media: cec: core: don't set last_initiator if tx in progress
    a69a15a1e789 arm64: Add missing Set/Way CMO encodings
    99de9a18e646 HID: wacom: Add error check to wacom_parse_and_register()
    2af8d9637270 scsi: target: iscsi: Prevent login threads from racing between each other
    321a81d26c8d sch_netem: acquire qdisc lock in netem_change()
    91274bbe78a2 Revert "net: phy: dp83867: perform soft reset and retain established link"
    25c8d38c7560 netfilter: nfnetlink_osf: fix module autoload
    476c617e4dd4 netfilter: nf_tables: disallow element updates of bound anonymous sets
    d3b110395fea be2net: Extend xmit workaround to BE3 chip
    789d5286060f net: dsa: mt7530: fix trapping frames on non-MT7621 SoC MT7530 switch
    35373d602bd4 ipvs: align inner_mac_header for encapsulation
    ee155675bda8 mmc: usdhi60rol0: fix deferred probing
    0bd483fb95ce mmc: sh_mmcif: fix deferred probing
    6160d37db171 mmc: sdhci-acpi: fix deferred probing
    b25875cf5e3b mmc: omap_hsmmc: fix deferred probing
    cbb0118f8aa0 mmc: omap: fix deferred probing
    e0d505356973 mmc: mvsdio: fix deferred probing
    c2e675509ff8 mmc: mvsdio: convert to devm_platform_ioremap_resource
    3ef787d61972 mmc: mtk-sd: fix deferred probing
    3c01d64996be net: qca_spi: Avoid high load if QCA7000 is not available
    bf7a4fd33669 xfrm: Linearize the skb after offloading if needed.
    d0fe8a733fa7 ieee802154: hwsim: Fix possible memory leaks
    dfcac203a36a rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()
    94199d4727f6 x86/mm: Avoid using set_pgd() outside of real PGD pages
    be178a5eae0f cifs: Fix potential deadlock when updating vol in cifs_reconnect()
    8a5aaa4562a9 cifs: Merge is_path_valid() into get_normalized_path()
    339134c15c64 cifs: Introduce helpers for finding TCP connection
    cf8c7aa90618 cifs: Get rid of kstrdup_const()'d paths
    3fa4c08104c4 cifs: Clean up DFS referral cache
    b73539b887a4 nilfs2: prevent general protection fault in nilfs_clear_dirty_page()
    1cc7dcfdeb5e writeback: fix dereferencing NULL mapping->host on writeback_page_template
    18a0202bec17 ip_tunnels: allow VXLAN/GENEVE to inherit TOS/TTL from VLAN
    ab530c9bec51 mmc: meson-gx: remove redundant mmc_request_done() call from irq context
    88b373d1c5e9 cgroup: Do not corrupt task iteration when rebinding subsystem
    c06c568e43e7 PCI: hv: Fix a race condition bug in hv_pci_query_relations()
    f02a67690777 Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
    966708ed9dd9 nilfs2: fix buffer corruption due to concurrent device reads
    a93ae93e9f1b media: dvb-core: Fix use-after-free due to race at dvb_register_device()
    225bd8cc9c3f media: dvbdev: fix error logic at dvb_register_device()
    5bc971f0435f media: dvbdev: Fix memleak in dvb_register_device
    40d7530bc7fd tick/common: Align tick period during sched_timer setup
    b9b61fd1f74d x86/purgatory: remove PGO flags
    4d02a166cbee tracing: Add tracing_reset_all_online_cpus_unlocked() function
    e14e9cc588bd epoll: ep_autoremove_wake_function should use list_del_init_careful
    e77e5481d5bf list: add "list_del_init_careful()" to go with "list_empty_careful()"
    c32ab1c1959a mm: rewrite wait_on_page_bit_common() logic
    559cefc7c25f nilfs2: reject devices with insufficient block count

(From OE-Core rev: c03281719f62d47ff98a4172cc48d875cbde5f2e)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Dhairya Nagodra
3b52050443 harfbuzz: Resolve backported commit bug.
The commit [https://github.com/openembedded/openembedded-core/commit/c22bbe9b45e3]
backports fix for CVE-2023-25193 for version 2.6.4.
The apply() in src/hb-ot-layout-gpos-table.hh ends prematurely.
The if block in apply() has an extra return statement,
which causes it to return w/o executing
buffer->unsafe_to_concat_from_outbuffer() function.

(From OE-Core rev: e3fda60c4131c21cfb3139c56c1771e342d4b9bf)

Signed-off-by: Dhairya Nagodra <dnagodra@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Yuta Hayama
959e7b1432 cve-update-nvd2-native: always pass str for json.loads()
Currently json.loads() accepts one of the types str, bytes, or bytearray
as an argument, but bytes and bytearrays have only been allowed since
python 3.6. The version of Python3 provided by default on Ubuntu 16.04
and Debian 9.x is 3.5, so make raw_data type str to work correctly on
these build hosts.

(From OE-Core rev: 4efdf7a93254056b9ac47de470740ac113b031f2)

Signed-off-by: Yuta Hayama <hayama@lineo.co.jp>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Peter Marko
729e5e306f procps: patch CVE-2023-4016
Backport patch from upstream master.

There were three changes needed to apply the patch:
* move NEWS change to start of the file
* change file location from src/ps/ to ps/
* change xmalloc/xcmalloc to malloc/cmalloc

The x*malloc functions were introduced in commit in future version.
584028dbe5
They call the original function plus additionally throw error when out of memory.
https://gitlab.com/procps-ng/procps/-/blob/v4.0.3/local/xalloc.h?ref_type=tags
So this replacement is correct in context of our version.

(From OE-Core rev: 1632c7223b2f8cd595e1ba20bc006c68fc833295)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Vijay Anusuri
3e0bb5455b ghostscript: backport fix for CVE-2023-38559
Upstream-Status: Backport from https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=d81b82c70bc1fb9991bb95f1201abb5dea55f57f

(From OE-Core rev: f70113d1d5b5359c8b668ba43aac362457927d9e)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:13 -10:00
Vivek Kumbhar
3afaf243ba qemu:fix CVE-2023-3354 VNC: improper I/O watch removal in TLS handshake can lead to remote unauthenticated denial of service
(From OE-Core rev: 447bab76f9ac465ad36540e3bfb9a2a3cdbfa6b6)

Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Emily Vekariya
00ba8af956 qemu: CVE-ID correction for CVE-2020-35505
- The commit [https://github.com/qemu/qemu/commit/995457517340]
  ("esp: ensure cmdfifo is not empty and current_dev is non-NULL")
  fixes CVE-2020-35505 instead of CVE-2020-35504.
- Hence, corrected the CVE-ID in CVE-2020-35505.patch.
- Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1909769

(From OE-Core rev: 9d54930a0c37e2878bbbe221341ebbd2bdd78a22)

Signed-off-by: Emily Vekariya <emily.vekariya@einfochips.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Dhairya Nagodra
3c6a02f04a dmidecode 3.2: Fix CVE-2023-30630
Upstream Repository: https://git.savannah.gnu.org/git/dmidecode.git

Bug Details: https://nvd.nist.gov/vuln/detail/CVE-2023-30630
Type: Security Fix
CVE: CVE-2023-30630
Score: 7.8
Patch: https://git.savannah.nongnu.org/cgit/dmidecode.git/commit/?id=6ca381c1247c

(From OE-Core rev: f3def5af120355a2454c088724e147bbce785d1b)

Signed-off-by: Dhairya Nagodra <dnagodra@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Hitendra Prajapati
ebca640cbb tiff: fix multiple CVEs
Backport fixes for:
* CVE-2023-2908 - Upstream-Status: Backport from 9bd48f0dbd
* CVE-2023-3316 - Upstream-Status: Backport from d63de61b1e
* CVE-2023-3618 - Upstream-Status: Backport from 881a070194 && b5c7d4c4e0

(From OE-Core rev: 4929d08cefac9ae2ebbdf94ccdc51a0f67f28164)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Hitendra Prajapati
b5f81a875d tiff: fix multiple CVEs
Backport fixes for:
* CVE-2023-25433 - Upstream-Status: Backport from 9c22495e5e && 688012dca2
* CVE-2023-25434 & CVE-2023-25435 - Upstream-Status: Backport from 69818e2f2d

* CVE-2023-26965 & CVE-2023-26966 - Upstream-Status: Backport from import from debian http://security.debian.org/debian-security/pool/updates/main/t/tiff/tiff_4.1.0+git191117-2~deb10u8.debian.tar.xz]

(From OE-Core rev: 3d322227477f9e82fc22de6e896174d04513d72b)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Peter Marko
2ff427ee40 libpcre2: patch CVE-2022-41409
Backport commit mentioned in NVD DB links.
94e1c00176

(From OE-Core rev: c25b88fc321b7c050108b29c75c0a159e0754f84)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Peter Marko
0de5f6a27a libarchive: ignore CVE-2023-30571
This issue was reported and discusses under [1] which is linked in NVD CVE report.
It was already documented that some parts or libarchive are thread safe and some not.
[2] was now merged to document that also reported function is not thread safe.
So this CVE *now* reports thread race condition for non-thread-safe function.
And as such the CVE report is now invalid.

The issue is still not closed for 2 reasons:
* better document what is and what is not thread safe
* request to public if someone could make these functions thread safe
This should however not invalidate above statment about ignoring this CVE.

[1] https://github.com/libarchive/libarchive/issues/1876
[2] https://github.com/libarchive/libarchive/pull/1875

(From OE-Core rev: 9374e680ae2376589a9bfe4565dfcf4dc9791aa8)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Vivek Kumbhar
f7f7d5514c go: fix CVE-2023-29406 net/http: insufficient sanitization of Host header
(From OE-Core rev: 07e03175de91739064ae5530b3df093b4d05510b)

Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Peter Marko
762bfb5fc5 libjpeg-turbo: patch CVE-2023-2804
Relevant links:
* linked fronm NVD:
  * https://github.com/libjpeg-turbo/libjpeg-turbo/issues/668#issuecomment-1492586118
* follow-up analysis:
  * https://github.com/libjpeg-turbo/libjpeg-turbo/issues/668#issuecomment-1496473989
  * picked commits fix all issues mentioned in this analysis

(From OE-Core rev: cb3c7efd313f758e9bade93b72527bc5dc470085)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Peter Marko
dcc4dbf463 python3: ignore CVE-2023-36632
This CVE shouldn't have been filed as the "exploit" is described in the
documentation as how the library behaves.

(From OE-Core rev: b66a677b76c7f15eb5c426f8dc7ac42e1e2e3f40)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c652f094d86c4efb7ff99accba63b8169493ab18)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Hitendra Prajapati
91feb9b975 ruby/cgi-gem: CVE-2021-33621 HTTP response splitting in CGI
Upstream-Status: Backport from 64c5045c0a

(From OE-Core rev: dfe4a2b601e094e2922b671f6cf73ff6a91f061f)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-16 03:55:12 -10:00
Steve Sakoman
32da5ee951 build-appliance-image: Update to dunfell head revision
(From OE-Core rev: 6dd64ca2d726d0b222a7608c65eb0a20454c3f99)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-04 05:45:39 -10:00
Steve Sakoman
88bec50206 gcc: fix runpath errors in cc1 binary
The runpath in the cc1 binary is:

Library runpath: [$ORIGIN/../../../recipe-sysroot-native/usr/lib:$ORIGIN/../../../recipe-sysroot-native/lib]

This does not match the actual location of the libraries, which would require:

Library runpath: [$ORIGIN/../../recipe-sysroot-native/usr/lib:$ORIGIN/../../recipe-sysroot-native/lib]

Prior to gcc 9.1 the recipe set B explicity with:

B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"

and this build directory structure matches the runpath in cc1, so there is no issue.

This line was commented out in versions 9.1 through 11.3.  The upgrade to 12.1 once
again uncommented this line.

As a result the runpath is incorrect in version 9.1 through 11.3 and cc1 defaults
to using host libraries.

This patch restores setting B as done in master and versions prior to 9.1

(From OE-Core rev: 43d5ebde6d609898064ea70c89a7eba002e5fd74)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-04 05:40:20 -10:00
Michael Opdenacker
aa5a1adb60 ref-manual: document image-specific variant of INCOMPATIBLE_LICENSE
This has been around without being properly documented since 2019 (!!!),
and is nowadays the preferred method for enforcing license restrictions.

(From yocto-docs rev: 7a67426330decf108b8f152c3cb6cd6d167c98e4)

Signed-off-by: Alexander Kanavin <alex@linutronix.de
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-02 04:46:16 -10:00
Steve Sakoman
df86cc15d0 build-appliance-image: Update to dunfell head revision
(From OE-Core rev: ab6a0d053d910c3d50fcb06e9c2ca98430b673a4)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:31:24 -10:00
Steve Sakoman
9c828566b2 poky.conf: bump version for 3.1.27
(From meta-yocto rev: e7886680c9436f78ba74f7882eb26999590229f4)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Steve Sakoman
d7ef6fd67c documentation: update for 3.1.27
(From yocto-docs rev: 957952fb61427d8549e3bc902b38b4a5acd2c618)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Steve Sakoman
6e42635ae0 openssl: fix intermittent openssl-ptest reproducibility issue
Adds two missing key sorts in generation of unified_info

Backported from a similar (but more invasive)  patch in the 3.x source code:

764cf5b263]

(From OE-Core rev: 6c505ef6c9950eb6d09bcec683fefe6edc7b2e6b)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Tom Hochstein
f8a370159b cmake: Fix CMAKE_SYSTEM_PROCESSOR setting for SDK
When building using an SDK, cmake complains that the target
architecture 'cortexa53-crypto' is unknown. The same build in bitbake
uses the target architecture 'aarch64'.

Set CMAKE_SYSTEM_PROCESSOR the same as for bitbake.

(From OE-Core rev: 7a7ef9d73affc23fa14712d56f1a40d0c46569cb)

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d32a6225eefce2073a1cd401034b5b4c68351bfe)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Nikhil R
7ac47c90cc libpng: Add ptest for libpng
libpng is a platform-independent library which
supports all PNG features.
This ptest executes the below binaries, parses
the png image and prints the image features.

1. pngfix - provides information about PNG image
copyrights details.

2. pngtest - tests, optimizes and optionally fixes
the zlib header in PNG files.

3. pngstest - verifies the integrity of PNG image by
dumping chunk level information.

4. timepng - provides details about PNG image chunks.

(From OE-Core rev: 843803bcc248b18cdefb29d610a1371e32e815ce)

Signed-off-by: Nikhil R <nikhil.r@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Anthony Bagwell
5de95d9c29 kernel-fitimage: fix dtbo support for fit images
8a2f4e143 added support for u-boot boot script but missed adding the
extra parameter to fitimage_emit_section_config on the dtbo branch

(From OE-Core rev: d1b6c34d33704f05374154e4ea7d8acdea7b8018)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 22bac8aea0d5d28cc5a3bf20edf638225cce2f88)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Trevor Gamblin
a022b1abef vim: upgrade 9.0.1527 -> 9.0.1592
Fixes:

https://nvd.nist.gov/vuln/detail/CVE-2023-2609
d1ae836 patch 9.0.1531: crash when register contents ends up being invalid
https://nvd.nist.gov/vuln/detail/CVE-2023-2610
ab9a2d8 patch 9.0.1532: crash when expanding "~" in substitute causes very long text

(From OE-Core rev: 8a481b1dfeeee8d8d3430f527da1f3f5b7d96999)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1e4b4dfb4145bc00eb6937b5f54a41170e9a5b4c)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Alexander Kanavin
228d031f73 wireless-regdb: upgrade 2023.02.13 -> 2023.05.03
(From OE-Core rev: 67adfd6cbcdbb765460e6f97d8957c872d8f5c81)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 47438402fa430499864a4b1f1a13eaac66aa21c0)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Alexander Kanavin
a04b507d39 linux-firmware: upgrade 20230404 -> 20230515
License-Update: additional firmwares

(From OE-Core rev: 17988a2cebcccb7ddacb3d085deeab0f0b8f646a)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 64603f602d00999220fe5bafeed996ddcb56d36b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Deepthi Hemraj
0bf993da8b glibc: stable 2.31 branch updates.
Below commits on glibc-2.31 stable branch are updated.
2d4f26e5cf x86: Fix wcsnlen-avx2 page cross length comparison

(From OE-Core rev: d89f5692514c68050349f37315e1dea14cbcfa24)

Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Priyal Doshi
5b0daa0061 tzdata: upgrade to 2023c
(From OE-Core rev: 62c42d4a1029de4fe9b19631cbd34722f6535edf)

Signed-off-by: Priyal Doshi <pdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Vijay Anusuri
fcb0381657 qemu: backport Debian patch to fix CVE-2023-0330
import patch from ubuntu to fix
 CVE-2023-0330

Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/qemu/tree/debian/patches?h=ubuntu/focal-security
Upstream commit
b987718bbb]

(From OE-Core rev: 559327579bcee685c6dc22b7ad5595960aa896c0)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Vivek Kumbhar
1adc1600f2 python3: fix CVE-2023-24329 urllib.parse url blocklisting bypass
(From OE-Core rev: 307f23e066e06793ec60f0cddf8ff1c64c02d834)

Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Vivek Kumbhar
218ca73cab curl: fix CVE-2023-28320 siglongjmp race condition may lead to crash
Introduced by: 3c49b405de (curl-7_9_8)
Fixed by: 13718030ad (curl-8_1_0)
Follow-up: f446258f02 (curl-8_1_0)
https://curl.se/docs/CVE-2023-28320.html

(From OE-Core rev: a6b2b550690c2ffdce1aef9da1595a42d1bc6348)

Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Ashish Sharma
ed4a2d3d41 go: Fix CVE-2023-29400
emit filterFailsafe for empty unquoted attr
value

(From OE-Core rev: 02a0e76e04ddbbbb381202d61cbb084333336f38)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Poonam Jadhav
8b1211f81f libx11: Fix CVE-2023-3138 for dunfell branch
Add patch to fix CVE-2023-3138 for dunfell branch

Link: 304a654a0d.patch

(From OE-Core rev: aed61452f5c9fc377ce3336b765eb1cb195482a8)

Signed-off-by: Poonam Jadhav <poonam.jadhav@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-22 16:24:17 -10:00
Ross Burton
87f16e1f3b cve-update-nvd2-native: actually use API keys
There were vestigal remains of API key support which could be removed,
but as using an API key - in theory - gives the user larger rate limits
it's probably wise to expose it.

If the user has an API key, then set NVDCVE_API_KEY.

(From OE-Core rev: b3fc8ef9aba822b3d485242c8ebd0e0bff0ebfc8)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a542de684282bfec79f24ae2f1a2027ffde319d8)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-13 07:03:17 -10:00
Ross Burton
579797adab cve-update-nvd2-native: log a little more
Add a note of what range we're fetching, and use bb.note() instead of
debug() as messages about retrying shouldn't really be considered debug
logging.

(From OE-Core rev: f6c3ee35ae9950aec4b3dc15062b1c1fb5610011)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b64a869b9c5e1d504f1011da16b5c5ff721afbf0)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-13 07:03:17 -10:00
Peter Marko
9faca1f692 cve-update-nvd2-native: increase retry count
Current 503 errors seem to last several seconds.
In most cases there are two errors and third request succeeds.
However sometimes the outage takes more than time needed
for two retries and third one also fails.

Extend retry count from 3 to 5 to improve the probablity
that the fetcher succeeds.

(From OE-Core rev: 46286a641f1113e22d39a427a5dc0a11321d434e)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f4d118af2360cff7f234102fd5e4b65a6f4146a6)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-13 07:03:17 -10:00
Peter Marko
6c5b006a10 cve-update-nvd2-native: retry all errors and sleep between retries
Last couple days it is not possible to update NVD DB as servers
are returning lot of errors.
Mostly "HTTP Error 503: Service Unavailable" is observed but
sporadially also some others.

Retrying helps in most cases, so extend retries to all errors.

Additionally add sleep which is recommended by NVD between requests.
These retries are already implemented between successful requests,
but giving servers time between failed ones is important, too.

(From OE-Core rev: 8bba9342f641e9aa51ccaebc02bc5d51354e1c72)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 88dad8f198baa80af5ab576498f4df6ed639d551)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-13 07:03:17 -10:00
Peter Marko
5e9e50e544 cve-update-nvd2-native: fix cvssV3 metrics
After upgrade to soon-to-be-released kirkstone 4.0.11 CVE annotations got broken.
Anything which has only cvssV3 does not resolve properly.
Fix the API fields used to extract it.

i0.0 score is now at level of NVD DB 1.1.
All CVEs with UNKNOWN vector are not present in NVD DB 1.1.

NVD API 1.1:
sqlite> select vector, count(vector) from nvd group by vector;
ADJACENT_NETWORK|4776
LOCAL|32146
NETWORK|167746
PHYSICAL|185
sqlite> select scorev3, count(scorev3) from nvd group by scorev3;
0.0|73331
1.8|7
1.9|3
...

NVD API 2.0 (broken):
sqlite> select vector, count(vector) from nvd group by vector;
ADJACENT_NETWORK|4587
LOCAL|26273
NETWORK|150421
UNKNOWN|24644
sqlite> select scorev3, count(scorev3) from nvd group by scorev3;
0.0|205925

NVD API 2.0 (fixed):
sqlite> select vector, count(vector) from nvd group by vector;
ADJACENT_NETWORK|5090
LOCAL|32322
NETWORK|168004
PHYSICAL|213
UNKNOWN|511
sqlite> select scorev3, count(scorev3) from nvd group by scorev3;
0.0|73841
1.8|7
1.9|3
...

(From OE-Core rev: 2233a187dc0da833401297667c1e2ed6bf5627fd)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 61a5857efdcc0f49c69c0deb24fce99007aeef19)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-13 07:03:17 -10:00
Ross Burton
60cd2c29ea cve-update-nvd2-native: use exact times, don't truncate
When requesting updates in a specific range, use the actual current time
and database mtime instead of truncating to midnight, and explicitly set
the timezone to UTC so that NIST don't treat the timestamps as _their_ local
time when they're _our_ local time.

(From OE-Core rev: e12b81ede54c92e372f0d80373bb91254d0a889f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9aa0ec37f5f74252588d2494a71c71a7d8e68df9)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-13 07:03:17 -10:00
Ross Burton
122c106794 cve-update-nvd2-native: handle all configuration nodes, not just first
Some CVEs, such as CVE-2013-6629, list multiple configurations which are
vulnerable. The current JSON parser only considers the first
configuration.

Instead, consider every configuration. We don't yet handle the AND/OR
logical operators, but this is a step in the right direction.

(From OE-Core rev: e521d6ce48d3b04eb2d53c710bba18593a908fe3)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e1bf4f6dd686055fe9a8bdcc3f739eac2807bae0)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-13 07:03:17 -10:00
Alexander Kanavin
65c2f76dca grub: submit determinism.patch upstream
(From OE-Core rev: 1fe434d42a3365f232b07864638128b7ac70f627)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 61947762e410c685f667e0af6440fb8a33cd6777)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Mikko Rapeli
a16a21af9a useradd-staticids.bbclass: improve error message
Current error message is difficult to read:

ERROR: Nothing PROVIDES 'image'
trs-image was skipped: image - image: normal username test does not have a static ID defined. Add test to one of these files

It's not clear that first "image" is recipe name, second "image" is
binary package name and that "test" is the user account which does not
have a static ID defined. Improve the error message so that these are
more explicit. Now the error message looks like:

image was skipped: Recipe image, package image: normal username "test" does not have a static ID defined.

(From OE-Core rev: ea997ec788a5397598e24301e40d1c30ffa68c04)

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 07898218f3908a83e07178b6530dfa48d55d4ec2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Fabien Mahot
84ef58ae39 oeqa/selftest/bbtests: add non-existent prefile/postfile tests
Fixes [YOCTO #10725]

(From OE-Core rev: 74fed908b807056cbb10c20d62d494f3089f52ee)

Signed-off-by: Fabien Mahot <fabien.mahot@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b0c33655fad5b2e7d96a45b6210527dfb766797b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Alexander Kanavin
e146653c21 scripts/runqemu: allocate unfsd ports in a way that doesn't race or clash with unrelated processes
There is already a neat check_free_port() function for finding an available port
atomically, so use that and make two additional tweaks:

- no need to allocate two separate ports; per unfsd documentation they can be the same

- move lockfile release until after unfsd has been shut down and the port(s) used has been freed

[YOCTO #15077]

(From OE-Core rev: 816d12f125974fc064d17c735b7769f7a9744597)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit dee96e82fb04ea99ecd6c25513c7bd368df3bd37)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Alexander Kanavin
b30e81df2b scripts/runqemu: split lock dir creation into a reusable function
(From OE-Core rev: d296853f1c5bcc6ccd800a4fbcbba18021f98518)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 004d6bcb067ecf1d796801fa43a98820c4efd3c7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Kai Kang
0a24a5bb3b pm-utils: fix multilib conflictions
It fails to instal pm-utils and lib32-pm-utils at same time:

Error: Transaction test error:
  file /usr/bin/pm-is-supported conflicts between attempted installs of lib32-pm-utils-1.4.1-r1.corei7_32 and pm-utils-1.4.1-r1.corei7_64
  file /usr/sbin/pm-hibernate conflicts between attempted installs of lib32-pm-utils-1.4.1-r1.corei7_32 and pm-utils-1.4.1-r1.corei7_64
  file /usr/sbin/pm-powersave conflicts between attempted installs of lib32-pm-utils-1.4.1-r1.corei7_32 and pm-utils-1.4.1-r1.corei7_64
  file /usr/sbin/pm-suspend conflicts between attempted installs of lib32-pm-utils-1.4.1-r1.corei7_32 and pm-utils-1.4.1-r1.corei7_64
  file /usr/sbin/pm-suspend-hybrid conflicts between attempted installs of lib32-pm-utils-1.4.1-r1.corei7_32 and pm-utils-1.4.1-r1.corei7_64

All of the conflicted files either is script which source a file in
${libdir}, or a link file to some file in ${libdir}. Compare the content
of installed files in ${libdir} exclude binaries, only the paths of
${libdir} diff. So re-define libdir with ${nonarch_libdir} to fix the
conflicts.

(From OE-Core rev: 292ff56250d2f916370c508fd7a94f3ab769a356)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f836541bcfdbf033a37537530b4e3b87b0a7f003)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Martin Jansa
f506b0c057 kmod: remove unused ptest.patch
* it was removed from SRC_URI in 2015:
  https://git.openembedded.org/openembedded-core/commit/?id=f80d136bdd578468035a88125fa1b84973fd912b

(From OE-Core rev: 4342d2a60e2ba8a7aeb683b78f1eef94eb2c2edc)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit cfc4586b4bf080a3a4aa419dffc76c5da2a95b74)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Pavel Zhukov
4cfb4fc8ed lib/terminal.py: Add urxvt terminal
This fixes failure [1] of menuconfig task in rxvt-unicode terminal in case if
xterm/Konsole/Gnome is not installed. Tested with rxvt-unicode-256color

[1]
WARNING: Terminal screen is supported but did not start
ERROR: No valid terminal found, unable to open devshell.
Tried the following commands:
	tmux split-window -c "{cwd}" "do_terminal"
	tmux new-window -c "{cwd}" -n "zephyr-helloworld Configuration" "do_terminal"
	xfce4-terminal -T "zephyr-helloworld Configuration" -e "do_terminal"
	terminology -T="zephyr-helloworld Configuration" -e do_terminal
	mate-terminal --disable-factory -t "zephyr-helloworld Configuration" -x do_terminal
	konsole --separate --workdir . -p tabtitle="zephyr-helloworld Configuration" -e do_terminal
	gnome-terminal -t "zephyr-helloworld Configuration" -- do_terminal
	xterm -T "zephyr-helloworld Configuration" -e do_terminal
	rxvt -T "zephyr-helloworld Configuration" -e do_terminal
	tmux new -c "{cwd}" -d -s devshell -n devshell "do_terminal"
	screen -D -m -t "zephyr-helloworld Configuration" -S devshell do_terminal
DEBUG: Python function do_menuconfig finished

(From OE-Core rev: 9dad23306348af9f54c5fcdfacdbc1e775bf5742)

Signed-off-by: Pavel Zhukov <pazhukov@suse.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 8d2fe4df8ae33e033caf4119a76715f085be1d15)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Thomas Roos
e211a16fb5 oeqa/selftest/cases/devtool.py: skip all tests require folder a git repo
Devtool selftests require poky dir a git repo, when downloading poky as a tar,
this is not the case. Those tests will now skipped.

[YOCTO #12389]

(From OE-Core rev: 5f3128e3a85e3a5d67d5dc1f2585fe6c236e443c)

Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 95a5bc130dc51ea9de95c64dbf0e9c7892415d50)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Lorenzo Arena
82fd9eb08f conf: add nice level to the hash config ignred variables
This is needed as each user could be setting different nice levels
while building, however this should not make the shared cache unusable.

(From OE-Core rev: b77850f613bdc103e5d529b6c62ae90e134106ae)

Signed-off-by: Lorenzo Arena <arena.lor@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 42784f9360345da1c01d988070253e7ffd5ac4ac)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Martin Jansa
f3a78fecc2 go.bbclass: don't use test to check output from ls
* avoids possibly confusing error message in log.do_install like:
  ls: cannot access 'etcd/3.5.7-r0/build/bin/linux_arm64/': No such file or directory

(From OE-Core rev: 236a3e0bf753669b4fddbd91be5fdb10c2e6093f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 2f1777e6ac5269a71203b6a2c562a43503be95ae)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Rusty Howell
8c4bad844f oe-depends-dot: Handle new format for task-depends.dot
The .dot file created by `bitbake -g` changed formats a while ago, which
broke oe-depends-dot.

Also add some useful examples to the --help output.

(From OE-Core rev: c49914bb3cb6116f2e1bed7de82a702c2e4f7b5d)

Signed-off-by: Rusty Howell <rustyhowell@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Wang Mingyu
2ae4aff0a6 mobile-broadband-provider-info: upgrade 20221107 -> 20230416
(From OE-Core rev: 698a70eab4384ee4938cb4550fa8469d62db786b)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 125f72393c9b6fea02757cdc3a22696945e0f490)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:59 -10:00
Chee Yang Lee
55750ffd78 python3: upgrade to 3.8.17
License-Update: update year to 2023
30afa75ad8

Release Notes for 3.8.15:
Security content in this release
CVE-2022-40674: bundled libexpat was upgraded from 2.4.7 to 2.4.9 which
fixes a heap use-after-free vulnerability in function doContent
gh-97616: a fix for a possible buffer overflow in list *= int
gh-97612: a fix for possible shell injection in the example script
get-remote-certificate.py (this issue originally had a CVE assigned to
it, which its author withdrew)
gh-96577: a fix for a potential buffer overrun in msilib

https://www.python.org/downloads/release/python-3815/

Release Notes for 3.8.16:
Security content in this release
gh-98739: Updated bundled libexpat to 2.5.0 to fix CVE-2022-43680 (heap
use-after-free).
gh-98517: Port XKCP’s fix for the buffer overflows in SHA-3 to fix
CVE-2022-37454.
gh-98433: The IDNA codec decoder used on DNS hostnames by socket or
asyncio related name resolution functions no longer involves a quadratic
algorithm to fix CVE-2022-45061. This prevents a potential CPU denial of
service if an out-of-spec excessive length hostname involving
bidirectional characters were decoded. Some protocols such as urllib
http 3xx redirects potentially allow for an attacker to supply such a
name.
gh-68966: The deprecated mailcap module now refuses to inject unsafe
text (filenames, MIME types, parameters) into shell commands to address
CVE-2015-20107. Instead of using such text, it will warn and act as if a
match was not found (or for test commands, as if the test failed).
gh-100001: python -m http.server no longer allows terminal control
characters sent within a garbage request to be printed to the stderr
server log.
gh-87604: Avoid publishing list of active per-interpreter audit hooks
via the gc module.

https://www.python.org/downloads/release/python-3816/

Release Notes for 3.8.17:
Security content in this release
gh-103142: The version of OpenSSL used in Windows and Mac installers has
been upgraded to 1.1.1u to address CVE-2023-2650, CVE-2023-0465,
CVE-2023-0466, CVE-2023-0464, as well as CVE-2023-0286, CVE-2022-4303,
and CVE-2022-4303 fixed previously in 1.1.1t (gh-101727).
gh-102153: urllib.parse.urlsplit() now strips leading C0 control and
space characters following the specification for URLs defined by WHATWG
in response to CVE-2023-24329.
gh-99889: Fixed a security in flaw in uu.decode() that could allow for
directory traversal based on the input if no out_file was specified.
gh-104049: Do not expose the local on-disk location in directory indexes
produced by http.client.SimpleHTTPRequestHandler.
gh-103935: trace.__main__ now uses io.open_code() for files to be
executed instead of raw open().
gh-101283: subprocess.Popen now uses a safer approach to find cmd.exe
when launching with shell=True.
gh-102953: The extraction methods in tarfile, and
shutil.unpack_archive(), have a new filter argument that allows limiting
tar features than may be surprising or dangerous, such as creating files
outside the destination directory. See Extraction filters for details.

https://www.python.org/downloads/release/python-3817/

(From OE-Core rev: 01a1f016a6558566a36098a993adaf4b40e30c78)

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:58 -10:00
Hitendra Prajapati
70d75e8996 grub2: Fix Multiple CVEs
Backport fixes for:
* CVE-2020-27749 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=c6c426e5ab6ea715153b72584de6bd8c82f698ec && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=b1c9e9e889e4273fb15712051c887e6078511448 && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=3d157bbd06506b170fde5ec23980c4bf9f7660e2 && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=8bc817014ce3d7a498db44eae33c8b90e2430926 && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=030fb6c4fa354cdbd6a8d6903dfed5d36eaf3cb2 && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=4ea7bae51f97e49c84dc67ea30b466ca8633b9f6

* CVE-2021-20225 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=2a330dba93ff11bc00eda76e9419bc52b0c7ead6
* CVE-2021-20233 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=2f533a89a8dfcacbf2c9dbc77d910f111f24bf33

(From OE-Core rev: 636aab87bc7e10b4ce0bdaa00dd01416a590a801)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:58 -10:00
Chee Yang Lee
b994c2d4f5 sysstat: fix CVE-2023-33204
import patch from debian to fix CVE-2023-33204
http://security.debian.org/debian-security/pool/updates/main/s/sysstat/sysstat_12.0.3-2+deb10u2.debian.tar.xz

upstream patch:
6f8dc568e6

(From OE-Core rev: c6bc5cfbed71b65753e50aee5a640934e754858a)

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:58 -10:00
Vijay Anusuri
eb7bb5b589 cups: Fix CVE-2023-34241
OpenPrinting CUPS is a standards-based, open source printing system for Linux and other Unix-like operating systems. Starting in version 2.0.0 and prior to version 2.4.6, CUPS logs data of free memory to the logging service AFTER the connection has been closed, when it should have logged the data right before. This is a use-after-free bug that impacts the entire cupsd process. The exact cause of this issue is the function `httpClose(con->http)` being called in `scheduler/client.c`. The problem is that httpClose always, provided its argument is not null, frees the pointer at the end of the call, only for cupsdLogClient to pass the pointer to httpGetHostname. This issue happens in function `cupsdAcceptClient` if LogLevel is warn or higher and in two scenarios: there is a double-lookup for the IP Address (HostNameLookups Double is set in `cupsd.conf`) which fails to resolve, or if CUPS is compiled with TCP wrappers and the connection is refused by rules from `/etc/hosts.allow` and `/etc/hosts.deny`. Version 2.4.6 has a patch for this issue.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-34241
https://github.com/OpenPrinting/cups/security/advisories/GHSA-qjgh-5hcq-5f25
https://security-tracker.debian.org/tracker/CVE-2023-34241

Upstream Patch:
9809947a95

(From OE-Core rev: 28b25ba7a8c6aa5c5744ca17e8686f2762791c72)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:58 -10:00
Richard Purdie
bc3497092e bitbake: runqueue: Fix deferred task/multiconfig race issue
If there are several multiconfigs in play for example a non-multiconfig with
a task with one hash and then three multiconfigs for the same task, different
architectures but the same hash (different to the non-mc), the three mcs
will be deferred until after the non-mc task but then will all run together
and race against each other.

Change the code to re-enable deferred tasks one at a time. This way, if they do
race, they won't run in parallel against each other.

(Bitbake rev: b60c7085ec370473bea9b3b4b65826a17638837f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9523e28658ad7fb446645b590608dfac2812afd3)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-12 05:13:58 -10:00
Bruce Ashfield
642040373e linux-yocto/5.4: cfg: fix DECNET configuration warning
Dropping CONFIG_DECNET as it has been removed from -stable
and we now get a configuration warning.

(From OE-Core rev: b7530e5360babbe9321ee4cf1e336412116a98cb)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Bruce Ashfield
a6f3173407 linux-yocto-rt/54: fix 5.4-rt build breakage
Integrating the following commit:

    commit 8d8179549a233e7517523ac12887016451da2e20
    Author: Bruce Ashfield <bruce.ashfield@gmail.com>
    Date:   Tue Jun 27 10:13:01 2023 -0400

        rt: fix 5.4-stable introduced compile errors

        The 5.4 stable series brough back two elements removed
        by the -rt patch:

         - tick_period
         - deferred/safe printk

        We fix the build by dropping the use of the period and
        deferred printk

(From OE-Core rev: 13add4fd84c2e8a14caad857fbadf83205758c31)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Bruce Ashfield
00277476e3 linux-yocto/5.4: update to v5.4.248
Updating  to the latest korg -stable release that comprises
the following commits:

    f2b499c27a95 Linux 5.4.248
    1cdc48aaff18 mmc: block: ensure error propagation for non-blk
    de517032ee39 drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth
    d3f7f557d8a2 neighbour: delete neigh_lookup_nodev as not used
    a433b85d1750 net: Remove unused inline function dst_hold_and_use()
    fbc0209ae3a7 neighbour: Remove unused inline function neigh_key_eq16()
    bc1ea55bf1cf afs: Fix vlserver probe RTT handling
    98acd5f0ce10 selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET
    1140f8bc29c2 net: tipc: resize nlattr array to correct size
    b83f86ba414c net: lapbether: only support ethernet devices
    ec694ad393cc net/sched: cls_api: Fix lockup on flushing explicitly created chain
    0456f470fa02 drm/nouveau: add nv_encoder pointer check for NULL
    b1d76d16af2a drm/nouveau/kms: Don't change EDID when it hasn't actually changed
    f654b8a1325f drm/nouveau/dp: check for NULL nv_connector->native_mode
    2ac7be7718a1 igb: fix nvm.ops.read() error handling
    44008337f80e sctp: fix an error code in sctp_sf_eat_auth()
    edd3d3dc4849 ipvlan: fix bound dev checking for IPv6 l3s mode
    6718478c18a4 IB/isert: Fix incorrect release of isert connection
    f8a91a024ab9 IB/isert: Fix possible list corruption in CMA handler
    8a867ab71302 IB/isert: Fix dead lock in ib_isert
    22125be516ef IB/uverbs: Fix to consider event queue closing also upon non-blocking mode
    ea4cf04d3f19 iavf: remove mask from iavf_irq_enable_queues()
    19a500f530c2 RDMA/rxe: Fix the use-before-initialization error of resp_pkts
    42ab73534583 RDMA/rxe: Removed unused name from rxe_task struct
    f99b6de58b5e RDMA/rxe: Remove the unused variable obj
    46305daf8064 net/sched: cls_u32: Fix reference counter leak leading to overflow
    88d6c1958bc0 ping6: Fix send to link-local addresses with VRF.
    474e0adf29cf netfilter: nfnetlink: skip error delivery on batch in case of ENOMEM
    67cafcd3e661 spi: fsl-dspi: avoid SCK glitches with continuous transfers
    8231594e21d1 spi: spi-fsl-dspi: Remove unused chip->void_write_data
    9d8b388a24c6 usb: dwc3: gadget: Reset num TRBs before giving back the request
    94e52fac1519 serial: lantiq: add missing interrupt ack
    b577b74f8f83 USB: serial: option: add Quectel EM061KGL series
    6b1203ae83c3 Remove DECnet support from kernel
    aad6addc17ae ALSA: hda/realtek: Add a quirk for Compaq N14JP6
    def7e17c98f7 net: usb: qmi_wwan: add support for Compal RXM-G1
    74bd53737372 RDMA/uverbs: Restrict usage of privileged QKEYs
    a8997ffad359 nouveau: fix client work fence deletion race
    01fd784b0762 powerpc/purgatory: remove PGO flags
    b16bf76b3828 kexec: support purgatories with .text.hot sections
    b27a5fbe3c87 nilfs2: fix possible out-of-bounds segment allocation in resize ioctl
    0dd2d8331eb4 nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key()
    e1fb47f13970 nios2: dts: Fix tse_mac "max-frame-size" property
    5e531f448e5a ocfs2: check new file size on fallocate call
    f6878da39f47 ocfs2: fix use-after-free when unmounting read-only filesystem
    82173fde61c7 drm:amd:amdgpu: Fix missing buffer object unlock in failure path
    63afd766211b xen/blkfront: Only check REQ_FUA for writes
    27447dada0b5 mips: Move initrd_start check after initrd address sanitisation.
    a365600bba27 MIPS: Alchemy: fix dbdma2
    6b39b06b8d5b parisc: Flush gatt writes and adjust gatt mask in parisc_agp_mask_memory()
    de873bce06a8 parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu()
    28850d25a62c btrfs: handle memory allocation failure in btrfs_csum_one_bio
    b31586747bae power: supply: Fix logic checking if system is running from battery
    dd8804117d4b irqchip/meson-gpio: Mark OF related data as maybe unused
    30ade27dbe66 regulator: Fix error checking for debugfs_create_dir
    a12155f0b1b6 platform/x86: asus-wmi: Ignore WMI events with codes 0x7B, 0xC0
    d26edc403c0a power: supply: Ratelimit no data debug output
    af44b2ddfc08 ARM: dts: vexpress: add missing cache properties
    bd725832eb50 power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
    82bfd14f1359 power: supply: sc27xx: Fix external_power_changed race
    66d5882dcc9f power: supply: ab8500: Fix external_power_changed race
    a8f286bfbc71 s390/dasd: Use correct lock while counting channel queue length
    d60be47f4357 dasd: refactor dasd_ioctl_information
    7f3bb75a0484 KEYS: asymmetric: Copy sig and digest in public_key_verify_signature()
    75d9e00f65cd test_firmware: fix a memory leak with reqs buffer

(From OE-Core rev: ff0f134daad2e1cae942355c9a8eb177be607d13)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Bruce Ashfield
8f837940fd linux-yocto/5.4: update to v5.4.247
Updating  to the latest korg -stable release that comprises
the following commits:

    61a2f83e4762 Linux 5.4.247
    4b0199bc8189 Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE"
    85258ae30708 mtd: spinand: macronix: Add support for MX35LFxGE4AD
    8e546674031f btrfs: unset reloc control if transaction commit fails in prepare_to_relocate()
    4223d91ca1b5 btrfs: check return value of btrfs_commit_transaction in relocation
    a35d89d3605b rbd: get snapshot context after exclusive lock is ensured to be held
    52a40eaa55d6 drm/atomic: Don't pollute crtc_state->mode_blob with error pointers
    2cc5d40e4d49 cifs: handle empty list of targets in cifs_reconnect()
    307ffb716282 cifs: get rid of unused parameter in reconn_setup_dfs_targets()
    73ed7996bbec ext4: only check dquot_initialize_needed() when debugging
    7d0a29c74a31 eeprom: at24: also select REGMAP
    0360652bf6ab i2c: sprd: Delete i2c adapter in .remove's error path
    c73f1c2f6816 bonding (gcc13): synchronize bond_{a,t}lb_xmit() types
    ec946898039a usb: usbfs: Use consistent mmap functions
    0147952d158b usb: usbfs: Enforce page requirements for mmap
    090878903dd3 pinctrl: meson-axg: add missing GPIOA_18 gpio group
    c6e842555050 rbd: move RBD_OBJ_FLAG_COPYUP_ENABLED flag setting
    69653f941619 Bluetooth: Fix use-after-free in hci_remove_ltk/hci_remove_irk
    953335a377b6 ceph: fix use-after-free bug for inodes when flushing capsnaps
    2416bac0e7b2 can: j1939: avoid possible use-after-free when j1939_can_rx_register fails
    bf0245bd44c0 can: j1939: change j1939_netdev_lock type to mutex
    9eed68d62e2a can: j1939: j1939_sk_send_loop_abort(): improved error queue handling in J1939 Socket
    2fc62d51d3e4 drm/amdgpu: fix xclk freq on CHIP_STONEY
    e752bb1c039f ALSA: hda/realtek: Add Lenovo P3 Tower platform
    ca599db7a5e0 ALSA: hda/realtek: Add a quirk for HP Slim Desktop S01
    d5ca4799e6d3 Input: psmouse - fix OOB access in Elantech protocol
    282a96e3f88f Input: xpad - delete a Razer DeathAdder mouse VID/PID entry
    a3a99a069eb9 batman-adv: Broken sync while rescheduling delayed work
    df7044fc099b bnxt_en: Query default VLAN before VNIC setup on a VF
    a6ca81297392 lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()
    198da74a4e8d net: sched: fix possible refcount leak in tc_chain_tmplt_add()
    8f7cbd6d5e39 net: sched: move rtm_tca_policy declaration to include file
    b8b90f92444b rfs: annotate lockless accesses to RFS sock flow table
    28ac3cf2ac21 rfs: annotate lockless accesses to sk->sk_rxhash
    a4c72805fda4 netfilter: ipset: Add schedule point in call_ad().
    0b705ed9d403 netfilter: conntrack: fix NULL pointer dereference in nf_confirm_cthelper
    c2c6133eebaf Bluetooth: L2CAP: Add missing checks for invalid DCID
    0f841f80390d Bluetooth: Fix l2cap_disconnect_req deadlock
    b0b1b97702a5 net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods
    7e0da73ce546 neighbour: fix unaligned access to pneigh_entry
    314713ff4c9b neighbour: Replace zero-length array with flexible-array member
    e96f52705a63 spi: qup: Request DMA before enabling clocks
    1cc6435cd704 i40e: fix build warnings in i40e_alloc.h
    fc75b8973de4 i40iw: fix build warning in i40iw_manage_apbvt()
    c425e71826e4 block/blk-iocost (gcc13): keep large values in a new enum
    ec97af8e8a36 blk-iocost: avoid 64-bit division in ioc_timer_fn

(From OE-Core rev: e4928321624e5cd6eb587e6804173559531b7c4c)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Bruce Ashfield
74b8f9ee39 linux-yocto/5.4: update to v5.4.246
Updating  to the latest korg -stable release that comprises
the following commits:

    f568a20f058f Linux 5.4.246
    6c0fc4725f6f drm/edid: fix objtool warning in drm_cvt_modes()
    914bf541c3bb wifi: rtlwifi: 8192de: correct checking of IQK reload
    58bc9baaef92 drm/edid: Fix uninitialized variable in drm_cvt_modes()
    77e442733faa RDMA/bnxt_re: Remove the qp from list only if the qp destroy succeeds
    a616aa258e46 RDMA/bnxt_re: Remove set but not used variable 'dev_attr'
    4ffad598bff4 scsi: dpt_i2o: Do not process completions with invalid addresses
    e2897f133acd scsi: dpt_i2o: Remove broken pass-through ioctl (I2OUSERCMD)
    56a4a9dc5ed1 regmap: Account for register length when chunking
    94f3bc7e84af test_firmware: fix the memory leak of the allocated firmware buffer
    fb7dce686fd1 fbcon: Fix null-ptr-deref in soft_cursor
    5ea6122caf51 ext4: add lockdep annotations for i_data_sem for ea_inode's
    b06346ef5778 ext4: disallow ea_inodes with extended attributes
    ec2a04f8fc9f ext4: set lockdep subclass for the ea_inode in ext4_xattr_inode_cache_find()
    2e636c0c9344 ext4: add EA_INODE checking to ext4_iget()
    d9de088797a0 tracing/probe: trace_probe_primary_from_call(): checked list_first_entry
    7df474125c37 selinux: don't use make's grouped targets feature yet
    b18bc3c9c2c5 tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK
    ae7fb0c8bf80 mmc: vub300: fix invalid response handling
    9d8f5797d791 wifi: rtlwifi: remove always-true condition pointed out by GCC 12
    843f51766784 lib/dynamic_debug.c: use address-of operator on section symbols
    0638dcc7e75f treewide: Remove uninitialized_var() usage
    1eb88dccb827 kernel/extable.c: use address-of operator on section symbols
    d069c7ce3995 eth: sun: cassini: remove dead code
    d04adc383f32 gcc-12: disable '-Wdangling-pointer' warning for now
    253d70232573 ACPI: thermal: drop an always true check
    a010f8e64689 x86/boot: Wrap literal addresses in absolute_pointer()
    f0bb5135553c flow_dissector: work around stack frame size warning
    cd943425c6aa ata: libata-scsi: Use correct device no in ata_find_dev()
    76c67ff783ac scsi: stex: Fix gcc 13 warnings
    cd91ead608f0 misc: fastrpc: reject new invocations during device removal
    bf1d0b84dfd2 misc: fastrpc: return -EPIPE to invocations on device removal
    d5f183881529 usb: gadget: f_fs: Add unbind event before functionfs_unbind
    ac388cbbd97c net: usb: qmi_wwan: Set DTR quirk for BroadMobi BM818
    e101e8160cf0 iio: dac: build ad5758 driver when AD5758 is selected
    a87236446a62 iio: dac: mcp4725: Fix i2c_master_send() return value handling
    c3b25245e3a8 iio: light: vcnl4035: fixed chip ID check
    711049e31e09 HID: wacom: avoid integer overflow in wacom_intuos_inout()
    4251ff7fd4a4 HID: google: add jewel USB id
    f3b4e2a636d1 iio: adc: mxs-lradc: fix the order of two cleanup operations
    030ca3f7b042 mailbox: mailbox-test: fix a locking issue in mbox_test_message_write()
    11b084412055 atm: hide unused procfs functions
    cea581b385ab ALSA: oss: avoid missing-prototype warnings
    384fd08858da netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
    f7e62f1b7229 wifi: b43: fix incorrect __packed annotation
    8a9035110288 scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed
    f1e6a1097141 arm64/mm: mark private VM_FAULT_X defines as vm_fault_t
    c87334f4e705 ARM: dts: stm32: add pin map for CAN controller on stm32f7
    a39f24357fdc wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value
    353fd22693a6 media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221
    66a6d704c251 media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*()
    ed47886a73db media: dvb-core: Fix use-after-free due on race condition at dvb_net
    e9033a425ab2 media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table
    08b20cb8e5b9 media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()
    46e8b0fe538b media: dvb_ca_en50221: fix a size write bug
    b66849f35462 media: netup_unidvb: fix irq init by register it at the end of probe
    88aef84eefb3 media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address
    6b9a534ec5cf media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer()
    f3c8ed7366cd media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer
    65033ab2f930 media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer()
    37e36b426197 media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer()
    64f1b8296bef media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer()
    d16f5dc3aa09 media: dvb_demux: fix a bug for the continuity counter
    a7c87057f259 ASoC: ssm2602: Add workaround for playback distortions
    619f008df14e xfrm: Check if_id in inbound policy/secpath match
    21ca81704611 ASoC: dwc: limit the number of overrun messages
    acd5f476c16e nbd: Fix debugfs_create_dir error checking
    19ce1e1f348d fbdev: stifb: Fix info entry in sti_struct on error path
    aa32f2fadb4c fbdev: modedb: Add 1920x1080 at 60 Hz video mode
    199f9c5430f9 media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
    b950966b44f9 ARM: 9295/1: unwind:fix unwind abort for uleb128 case
    a823d8e0bb02 mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
    29bfbc8a63c4 watchdog: menz069_wdt: fix watchdog initialisation
    0018639be2d9 mtd: rawnand: marvell: don't set the NAND frequency select
    5f0043efdc24 mtd: rawnand: marvell: ensure timing values are written
    6c0aacf1b4e1 net: dsa: mv88e6xxx: Increase wait after reset deactivation
    94a00f1142c5 net/sched: flower: fix possible OOB write in fl_set_geneve_opt()
    dd4b5a204dfa udp6: Fix race condition in udp6_sendmsg & connect
    cd4a37f0dcc9 net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report
    cec562fbf8c5 ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use
    9e6bb63e5e66 net: sched: fix NULL pointer dereference in mq_attach
    2188c0f09532 net/sched: Prohibit regrafting ingress or clsact Qdiscs
    80b20d528a71 net/sched: Reserve TC_H_INGRESS (TC_H_CLSACT) for ingress (clsact) Qdiscs
    321f38375517 net/sched: sch_clsact: Only create under TC_H_CLSACT
    5f67d33c01b3 net/sched: sch_ingress: Only create under TC_H_INGRESS
    381a703220fb tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
    32e9a9ee285f tcp: deny tcp_disconnect() when threads are waiting
    26e830858a2b af_packet: do not use READ_ONCE() in packet_bind()
    43f1402dc2e9 mtd: rawnand: ingenic: fix empty stub helper definitions
    dd3773e8c8c9 amd-xgbe: fix the false linkup in xgbe_phy_status
    603eec060d14 af_packet: Fix data-races of pkt_sk(sk)->num.
    bab2f42d8d8a netrom: fix info-leak in nr_write_internal()
    d7aeb591b101 net/mlx5: fw_tracer, Fix event handling
    c7ac3ebf41ee dmaengine: pl330: rename _start to prevent build error
    17d70de57248 iommu/amd: Don't block updates to GATag if guest mode is on
    fa961ad9ef91 iommu/rockchip: Fix unwind goto issue
    5abb81b4d762 RDMA/bnxt_re: Fix return value of bnxt_re_process_raw_qp_pkt_rx
    2bafc7f22db3 RDMA/bnxt_re: Refactor queue pair creation code
    56446791bccd RDMA/bnxt_re: Enable SRIOV VF support on Broadcom's 57500 adapter series
    cc5a673d85a9 RDMA/efa: Fix unsupported page sizes in device
    cf0b1e5482ea Linux 5.4.245
    ec14c6e0a2e5 netfilter: ctnetlink: Support offloaded conntrack entry deletion
    5b7d4d91c047 ipv{4,6}/raw: fix output xfrm lookup wrt protocol
    6c88024cab83 binder: fix UAF caused by faulty buffer cleanup
    e6183912ee90 bluetooth: Add cmd validity checks at the start of hci_sock_ioctl()
    9ba28194ea50 io_uring: have io_kill_timeout() honor the request references
    6de3014d4bd8 io_uring: don't drop completion lock before timer is fully initialized
    b0bfceaa8c0e io_uring: always grab lock in io_cancel_async_work()
    00395fd7f9a0 cdc_ncm: Fix the build warning
    672e59995e70 net/mlx5: Devcom, serialize devcom registration
    f42feb29bad9 net/mlx5: devcom only supports 2 ports
    67637a7ee6bd fs: fix undefined behavior in bit shift for SB_NOUSER
    02281c23d069 power: supply: bq24190: Call power_supply_changed() after updating input current
    f6518954c146 power: supply: core: Refactor power_supply_set_input_current_limit_from_supplier()
    db00ef8fd609 power: supply: bq27xxx: After charger plug in/out wait 0.5s for things to stabilize
    ff484163dfb6 net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize
    a270ca35a949 cdc_ncm: Implement the 32-bit version of NCM Transfer Block
    51d0ac4577c2 Linux 5.4.244
    edec0d399907 3c589_cs: Fix an error handling path in tc589_probe()
    3dfc1004d9af net/mlx5: Devcom, fix error flow in mlx5_devcom_register_device
    c59106f8bca1 net/mlx5: Fix error message when failing to allocate device memory
    8680d838c98c forcedeth: Fix an error handling path in nv_probe()
    b8db4a4e2007 ASoC: Intel: Skylake: Fix declaration of enum skl_ch_cfg
    0099a29bc5a0 x86/show_trace_log_lvl: Ensure stack pointer is aligned, again
    c60f38c9bdcb xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
    9b13972e4f23 coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet()
    f6b610730e8f power: supply: sbs-charger: Fix INHIBITED bit for Status reg
    0c5f4cec7596 power: supply: bq27xxx: Fix poll_interval handling and races on remove
    dafe9136be7b power: supply: bq27xxx: Fix I2C IRQ race on remove
    7b3b11964979 power: supply: bq27xxx: Fix bq27xxx_battery_update() race condition
    96bfafbc7d80 power: supply: leds: Fix blink to LED on transition
    011f47c8b838 ipv6: Fix out-of-bounds access in ipv6_find_tlv()
    120cdad8b2ae bpf: Fix mask generation for 32-bit narrow loads of 64-bit fields
    9928ce5225d6 selftests: fib_tests: mute cleanup error message
    58766252f6b2 net: fix skb leak in __skb_tstamp_tx()
    2b580d0f03c4 media: radio-shark: Add endpoint checks
    a730feb672c7 USB: sisusbvga: Add endpoint checks
    80100e0863e5 USB: core: Add routines for endpoint checks in old drivers
    7e3ae83371a4 udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated().
    9ea0c5f90a27 net: fix stack overflow when LRO is disabled for virtual interfaces
    1522dc58bff8 fbdev: udlfb: Fix endpoint check
    be646802b3dc debugobjects: Don't wake up kswapd from fill_pool()
    4e5a7181a6c3 x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms
    6d091e0ddcf3 parisc: Fix flush_dcache_page() for usage from irq context
    b556618baca5 selftests/memfd: Fix unknown type name build failure
    04aee084a3fa x86/mm: Avoid incomplete Global INVLPG flushes
    a9f5423460a6 btrfs: use nofs when cleaning up aborted transactions
    4f92934d8073 gpio: mockup: Fix mode of debugfs files
    da8adda57984 parisc: Allow to reboot machine after system halt
    43ffe982a304 parisc: Handle kgdb breakpoints only in kernel context
    f7d19a366cd2 m68k: Move signal frame following exception on 68020/030
    8facb9cc168a ALSA: hda/realtek: Enable headset onLenovo M70/M90
    5cc3e698c2bb ALSA: hda/ca0132: add quirk for EVGA X299 DARK
    68e4c390173e mt76: mt7615: Fix build with older compilers
    b558275c1b04 spi: fsl-cpm: Use 16 bit mode for large transfers with even size
    d64a45c019ac spi: fsl-spi: Re-organise transfer bits_per_word adaptation
    aabe8ca79139 watchdog: sp5100_tco: Immediately trigger upon starting.
    aeff9e7e87c1 s390/qdio: fix do_sqbs() inline assembly constraint
    ab196fe70a18 s390/qdio: get rid of register asm
    a4e3c4c65ae8 vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF
    74e644795d37 vc_screen: rewrite vcs_size to accept vc, not inode
    e9399d4ea5ee usb: gadget: u_ether: Fix host MAC address case
    939cafcdf7de usb: gadget: u_ether: Convert prints to device prints
    c8489e0fab18 lib/string_helpers: Introduce string_upper() and string_lower() helpers
    7e15602c5073 HID: wacom: add three styli to wacom_intuos_get_tool_type
    2a12339ce34f HID: wacom: Add new Intuos Pro Small (PTH-460) device IDs
    b5185f1b11c7 HID: wacom: Force pen out of prox if no events have been received in a while
    e0c1b35239d9 netfilter: nf_tables: hold mutex on netns pre_exit path
    6236af6936dd netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag
    05b4105e6852 netfilter: nf_tables: stricter validation of element data
    e832e4bae556 netfilter: nf_tables: allow up to 64 bytes in the set element data area
    28fe10236a64 netfilter: nf_tables: add nft_setelem_parse_key()
    eb5b579bd69f netfilter: nf_tables: validate registers coming from userspace.
    cfe1b9719cce netfilter: nftables: statify nft_parse_register()
    7c788393d453 netfilter: nftables: add nft_parse_register_store() and use it
    25336cd96b03 netfilter: nftables: add nft_parse_register_load() and use it
    116d53f09ff5 nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
    df89b1753eb1 powerpc/64s/radix: Fix soft dirty tracking
    60b9a9c8f370 tpm/tpm_tis: Disable interrupts for more Lenovo devices
    a33c172c1e34 ceph: force updating the msg pointer in non-split case
    6eb9ed0ab7b5 serial: Add support for Advantech PCI-1611U card
    21f107a95965 statfs: enforce statfs[64] structure initialization
    1eb3e32de7b1 KVM: x86: do not report a vCPU as preempted outside instruction boundaries
    a88638a95407 can: kvaser_pciefd: Disable interrupts in probe error path
    4579e2556767 can: kvaser_pciefd: Do not send EFLUSH command on TFD interrupt
    33d5a0a4985a can: kvaser_pciefd: Clear listen-only bit if not explicitly requested
    e5ac4f12074e can: kvaser_pciefd: Empty SRB buffer in probe
    c0e9fb21b612 can: kvaser_pciefd: Call request_irq() before enabling interrupts
    36cd7601e6b9 can: kvaser_pciefd: Set CAN_STATE_STOPPED in kvaser_pciefd_stop()
    e65811289346 can: j1939: recvmsg(): allow MSG_CMSG_COMPAT flag
    880482525101 ALSA: hda/realtek: Add quirk for 2nd ASUS GU603
    57fd0d122edd ALSA: hda/realtek: Add a quirk for HP EliteDesk 805
    739056188ad3 ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table
    4ef155ddf957 ALSA: hda: Fix Oops by 9.1 surround channel names
    4f9c0a7c2726 usb: typec: altmodes/displayport: fix pin_assignment_show
    33b6648d27b8 usb: dwc3: debugfs: Resume dwc3 before accessing registers
    241491524ab0 USB: UHCI: adjust zhaoxin UHCI controllers OverCurrent bit value
    1f36dc41616b usb-storage: fix deadlock when a scsi command timeouts more than once
    7cef7681aa77 USB: usbtmc: Fix direction for 0-length ioctl control messages
    f662f856acec vlan: fix a potential uninit-value in vlan_dev_hard_start_xmit()
    53bf7cda160b igb: fix bit_shift to be in [1..8] range
    e20105d967ab cassini: Fix a memory leak in the error handling path of cas_init_one()
    e519a404a5bb wifi: iwlwifi: mvm: don't trust firmware n_channels
    d0baaadd1c5e net: bcmgenet: Restore phy_stop() depending upon suspend/close
    2cca63d5bc4e net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
    435855b0831b net: nsh: Use correct mac_offset to unwind gso skb in nsh_gso_segment()
    ed50fcab1435 drm/exynos: fix g2d_open/close helper function definitions
    1550bcf2983a media: netup_unidvb: fix use-after-free at del_timer()
    69055f99900b net: hns3: fix reset delay time to avoid configuration timeout
    304e5cb77eb8 net: hns3: fix sending pfc frames after reset issue
    d1bcc606870e erspan: get the proto with the md version for collect_md
    f185ede016c9 ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
    0eb3ec0a3553 ip6_gre: Make o_seqno start from 0 in native mode
    304096241398 ip6_gre: Fix skb_under_panic in __gre6_xmit()
    7525aa211758 serial: arc_uart: fix of_iomap leak in `arc_serial_probe`
    5a90309002cd vsock: avoid to close connected socket after the timeout
    5009aead17f0 ALSA: firewire-digi00x: prevent potential use after free
    b22b514209ff net: fec: Better handle pm_runtime_get() failing in .remove()
    033297ef3bba af_key: Reject optional tunnel/BEET mode templates in outbound policies
    912a6cff0db1 cpupower: Make TSC read per CPU for Mperf monitor
    131eb9c9b1a0 ASoC: fsl_micfil: register platform component before registering cpu dai
    a3714a47b401 btrfs: fix space cache inconsistency after error loading it from disk
    596898303745 btrfs: replace calls to btrfs_find_free_ino with btrfs_find_free_objectid
    1e453cb55014 mfd: dln2: Fix memory leak in dln2_probe()
    bdc33478d5d3 phy: st: miphy28lp: use _poll_timeout functions for waits
    e6e917e82de4 Input: xpad - add constants for GIP interface numbers
    9fcef1e37d54 iommu/arm-smmu-v3: Acknowledge pri/event queue overflow if any
    4461f41ece4d clk: tegra20: fix gcc-7 constant overflow warning
    c23e6383d7fe RDMA/core: Fix multiple -Warray-bounds warnings
    3ed95a6f6c64 recordmcount: Fix memory leaks in the uwrite function
    38a118fd545b sched: Fix KCSAN noinstr violation
    cbe3063a9be1 mcb-pci: Reallocate memory region to avoid memory overlapping
    d5cd2928d310 serial: 8250: Reinit port->pm on port specific driver unbind
    ccb12585a735 usb: typec: tcpm: fix multiple times discover svids error
    c5405c767173 HID: wacom: generic: Set battery quirk only when we see battery data
    d3f32dc2ccc2 spi: spi-imx: fix MX51_ECSPI_* macros when cs > 3
    bf80dbd52899 HID: logitech-hidpp: Reconcile USB and Unifying serials
    e28f9de2d4d7 HID: logitech-hidpp: Don't use the USB serial for USB devices
    8a65476dd1ca staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE
    2112c4c47d36 Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp
    fa57021262e9 wifi: iwlwifi: dvm: Fix memcpy: detected field-spanning write backtrace
    0ad8dd870aa1 wifi: iwlwifi: pcie: Fix integer overflow in iwl_write_to_user_buf
    f6f2d16c77f9 wifi: iwlwifi: pcie: fix possible NULL pointer dereference
    a7ec2f424f6e samples/bpf: Fix fout leak in hbm's run_bpf_prog
    4ceedc2f8bdf f2fs: fix to drop all dirty pages during umount() if cp_error is set
    8659c5f4ffaa ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()
    cee78217a7ae ext4: set goal start correctly in ext4_mb_normalize_request
    d43b1bdb1005 gfs2: Fix inode height consistency check
    410e610a96c5 scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition
    cc2d2b3dbfb0 lib: cpu_rmap: Avoid use after free on rmap->obj array entries
    89f5055f9b0b scsi: target: iscsit: Free cmds before session free
    67236cf14db3 net: Catch invalid index in XPS mapping
    92af9cb86ab0 net: pasemi: Fix return type of pasemi_mac_start_tx()
    644a9d5e2276 scsi: lpfc: Prevent lpfc_debugfs_lockstat_write() buffer overflow
    c4813f858e5c ext2: Check block size validity during mount
    56c7e9c39bd5 wifi: brcmfmac: cfg80211: Pass the PMK in binary instead of hex
    c409eb45f5dd ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
    710e09fd116e ACPICA: Avoid undefined behavior: applying zero offset to null pointer
    99c8f2e6f33a drm/tegra: Avoid potential 32-bit integer overflow
    ccae2233e993 ACPI: EC: Fix oops when removing custom query handlers
    48ac727ea4a3 firmware: arm_sdei: Fix sleep from invalid context BUG
    a2a5d3a584bf memstick: r592: Fix UAF bug in r592_remove due to race condition
    d73e8c47675e regmap: cache: Return error in cache sync operations for REGCACHE_NONE
    9b72cb394f96 drm/amd/display: Use DC_LOG_DC in the trasform pixel function
    a75d9211a07f fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode()
    196528ad4844 af_unix: Fix data races around sk->sk_shutdown.
    7d17bc2d4e75 af_unix: Fix a data race of sk->sk_receive_queue->qlen.
    699c9e7c9f66 net: datagram: fix data-races in datagram_poll()
    1aa872e967f2 ipvlan:Fix out-of-bounds caused by unclear skb->cb
    4188c5269475 net: add vlan_get_protocol_and_depth() helper
    57a269d82f2e net: tap: check vlan with eth_type_vlan() method
    1747aa98ab13 net: annotate sk->sk_err write from do_recvmmsg()
    a507022c862e netlink: annotate accesses to nlk->cb_running
    b47aae7038cc netfilter: conntrack: fix possible bug_on with enable_hooks=1
    d7343f8de019 net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
    42e1dafa65e2 linux/dim: Do nothing if no time delta between samples
    7460ac5a66fb ARM: 9296/1: HP Jornada 7XX: fix kernel-doc warnings
    22b8ac608af5 drm/mipi-dsi: Set the fwnode for mipi_dsi_device
    d4992b2b5c68 driver core: add a helper to setup both the of_node and fwnode of a device

(From OE-Core rev: bc75da82987e243bdfe3e1192bb715438b3a7378)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Vijay Anusuri
7256436957 libcap: backport Debian patches to fix CVE-2023-2602 and CVE-2023-2603
import patches from ubuntu to fix
 CVE-2023-2602
 CVE-2023-2603

Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libcap2/tree/debian/patches?h=ubuntu/focal-security
Upstream commit
https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=bc6b36682f188020ee4770fae1d41bde5b2c97bb
&
https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=422bec25ae4a1ab03fd4d6f728695ed279173b18]

(From OE-Core rev: d0718a43a00223aa074f14e769214ba11d4f8ef2)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Hitendra Prajapati
f25b363233 go: fix CVE-2023-29402 & CVE-2023-29404
Backport fixes for:
* CVE-2023-29402 - Upstream-Status: Backport from c160b49b6d
* CVE-2023-29404 - Upstream-Status: Backport from bf3c8ce03e

(From OE-Core rev: a4a989605d8cab3278d6c6e32eb882815ff36a28)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Ashish Sharma
2474c30274 go: Backport fix CVE-2023-29405
Upstream-Status: Backport
[fa60c381ed
&
1008486a9f]

(From OE-Core rev: ce213403b4e82f1b191fed4ef6494e9dee55c4f8)

Signed-off-by: Ashish Sharma <asharma@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Ross Burton
5ca4b2a548 ninja: Whitelist CVE-2021-4336, wrong ninja
(From OE-Core rev: c2dd2c13ff26c3f046e35a2f6b8afeb099ef422a)

(From OE-Core rev: a056017d8383686651de6a72b50d95213bacf226)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9a106486ad)
Signed-off-by: virendra thakur <virendrak@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Vijay Anusuri
a84a25acc5 libjpeg-turbo: CVE-2020-35538 Null pointer dereference in jcopy_sample_rows() function
Upstream-Status: Backport
[9120a24743
&
a46c111d9f]

(From OE-Core rev: 345ffb433060f017d212135a5b2383017f32d321)

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-04 05:37:07 -10:00
Ian Ray
c8f5ff0ffe systemd-systemctl: support instance expansion in WantedBy
Refactor _process_deps to expand systemd instance specifier "%i" to the
template instance.

This change expands on prior commit e510222b57 ("systemd-systemctl: fix
instance template WantedBy symlink construction") by substituting every
"%i" pattern-match with the instance name.

The regexp handles the following cases:

* svc-wants@%i.service

* sys-subsystem-net-devices-%i.device

(From OE-Core rev: 2aa82324d43467e7c8bfbbb59570ee3306264b75)

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 9356276137267a29ae2289d796a2940918375308)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Martin Siegumfeldt
822d364542 systemd-systemctl: fix instance template WantedBy symlink construction
Fix issue of the below instance template systemd service dependency

[Install]
WantedBy=svc-wants@%i.service

creating the symlink (instance "a" example)

/etc/systemd/system/svc-wants@%i.service.wants/svc-wanted-by@a.service

which should be

/etc/systemd/system/svc-wants@a.service.wants/svc-wanted-by@a.service

as implemented by this change.

The functionality appears regressed just after "thud" baseline when the
logic was refactored from shell script into python (commit
925e30cb10)

(From OE-Core rev: 308397f0bb3d6f3d4e9ec2c6a10823184049c9b5)

(From OE-Core rev: 2751472807edc6d2ccc93b6339e6dc57d4abb2da)

Signed-off-by: Martin Siegumfeldt <mns@gomspace.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
(cherry picked from commit 372b29c8ad270d4d430c26a4e614976c7029afaf)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Andrej Valek
b01dd27a8d kernel-fitimage: use correct kernel image
Even if initramfs_bundle_path was used, a wrong compression was reflected
in output its template file. Use linux.bin as universal kernel image.
The linux.bin file covers both cases because it's beying created from
vmlinux.

We know, that vmlinux is created inside compressed directory already,
so no external compression will be used.

(From OE-Core rev: 8280c089b0df97368476b8bc54ed758e809f42f5)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Walter Schweizer <walter.schweizer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Backport of 27fbbeaf972bb7e2535c1b23375cfa9d66b69db6 in master branch
Signed-off-by: Remi Peuvergne <remi.peuvergne@non.se.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Abdellatif El Khlifi
42a4f98ab5 kernel-fitimage: adding support for Initramfs bundle and u-boot script
This commit adds Initramfs bundle support to the FIT image in addition
to u-boot boot script capability.

These new features are selectable.

In case of Initramfs, the kernel is configured to be bundled with the rootfs
in the same binary (ie: zImage-initramfs-<machine>.bin). When the kernel is
copied to RAM and executed, it unpacks the Initramfs rootfs.

For more information about Initramfs please read:

https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt

For more details about the Initramfs bundle and boot script implementation
please check the kernel-fitimage.bbclass paragraph in Yocto reference
or mega manual.

Current limitations:

- Initramfs bundle FIT support has been tested on ARM 32-bit
- The kernel image type in case of ARM 32-bit is zImage

Change-Id: I901bfd899e8d733c5b9a2b6645b1d4748f4b1fda
(From OE-Core rev: e3eb79c0a11e9f67af3161361fb88b00123ecbac)

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Backport of 19fa415c8769a67b52babd80f71d68bf36a21db2 in master branch
Signed-off-by: Remi Peuvergne <remi.peuvergne@non.se.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Steve Sakoman
756bae9bf9 uninative.bbclass: handle read only files outside of patchelf
We are seeing autobuilder failures with the latest uninative:

patchelf: open: Permission denied

See upstream discussion which suggests handling
read-only files explicitly outside of patchelf:
https://github.com/NixOS/patchelf/pull/89

(From OE-Core rev: 3680fcbf9ba327aedb32bb4eb647dd56fcccfd51)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Michael Halstead
ec29356556 uninative: Upgrade to 4.0 to include latest gcc 13.1.1
(From OE-Core rev: 0179c939e4abab008d3c3aa9c1c1eb63b78a6e09)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f87becb69e02bdf055dffb633ed4f6d36b36f7a7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Michael Halstead
f6f1b85384 uninative: Upgrade to 3.10 to support gcc 13
(From OE-Core rev: 15287d18c18152efcfc56a2ae16efdc42c53d92a)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f811bffb861b23238e8291394bd6e8407f013619)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Michael Halstead
6dcf266eb4 uninative: Upgrade to 3.9 to include glibc 2.37
Update uninative to work with the new glibc 2.37.

(From OE-Core rev: c95020a30ee8266d4bfa7b14a7526c10590027fd)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 360971a6ba562fa0b29bd062b96ede2d3a47fa2e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Michael Halstead
5ea3190383 uninative: Upgrade to 3.8.1 to include libgcc
Including libgcc solves issues with libpthread.

(From OE-Core rev: 8bb60a90dbd59b22e5ba884804b3cb47df45e97d)

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 36eb46589fb01374d4738a2c376386c68d06aa83)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Richard Purdie
5127d99785 uninative: Ensure uninative is enabled in all cases for BuildStarted event
Recent changes in bitbake mean the datastore is not always reset between
ConfigParsed and BuildStarted. This means in a fresh buiild, with memory
resident bitbake active, uninative may end up disabled.

Update the code so the enable code is always run at BuildStarted if
needed.

(From OE-Core rev: 24897c70980f934cf59a28a0d3b6e8fddcb15a7f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit db743cc78fe5172bb4a4dac9c1dad4f5aa9e1491)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Jan Vermaete
ff22728dd5 cve-update-nvd2-native: added the missing http import
(From OE-Core rev: 787acb1cbc22c0f3bd0cc163c527cc7a98007f26)

Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
(cherry picked from commit 39d2cde7eb922cb0a2cf9402cd8b3ae3b4cc2f62)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Marta Rybczynska
af419f2429 cve-update-nvd2-native: new CVE database fetcher
Add new fetcher for the NVD database using the 2.0 API [1].
The implementation changes as little as possible, keeping the current
database format (but using a different database file for the transition
period), with a notable exception of not using the META table.

Minor changes that could be visible:
- the database starts in 1999 instead of 2002
- the complete fetch is longer (30 minutes typically)

[1] https://nvd.nist.gov/developers/vulnerabilities

(From OE-Core rev: 191e2c6d7009999f049a0cf8460259f8f91a829d)

Signed-off-by: Marta Rybczynska <marta.rybczynska@syslinbit.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit fb62c4c3dbca4e58f7ce6cf29d4b630a06411a97)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Hitendra Prajapati
04003b36bf openssl: CVE-2023-2650 Possible DoS translating ASN.1 object identifiers
Upstream-Status: Backport from 9e209944b3

(From OE-Core rev: 8a9d188b4d838bbbf8aab14fad1ee5aaadb86621)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:36 -10:00
Sanjay Chitroda
800b69b78b cups: Fix CVE-2023-32324
OpenPrinting CUPS is an open source printing system. In versions 2.4.2
and prior, a heap buffer overflow vulnerability would allow a remote
attacker to launch a denial of service (DoS) attack. A buffer overflow
vulnerability in the function `format_log_line` could allow remote
attackers to cause a DoS on the affected system. Exploitation of the
vulnerability can be triggered when the configuration file `cupsd.conf`
sets the value of `loglevel `to `DEBUG`. No known patches or
workarounds exist at time of publication.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-32324
https://security-tracker.debian.org/tracker/CVE-2023-32324

Upstream Patch:
https://github.com/OpenPrinting/cups/commit/fd8bc2d32589

(From OE-Core rev: cb46ae57abe3069d6a4dc2ab0b8dfce5a4a5bd15)

Signed-off-by: Sanjay Chitroda <schitrod@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-06-27 05:24:35 -10:00
373 changed files with 43270 additions and 2817 deletions

24
SECURITY.md Normal file
View File

@@ -0,0 +1,24 @@
How to Report a Potential Vulnerability?
========================================
If you would like to report a public issue (for example, one with a released
CVE number), please report it using the
[https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Security Security Bugzilla].
If you have a patch ready, submit it following the same procedure as any other
patch as described in README.md.
If you are dealing with a not-yet released or urgent issue, please send a
message to security AT yoctoproject DOT org, including as many details as
possible: the layer or software module affected, the recipe and its version,
and any example code, if available.
Branches maintained with security fixes
---------------------------------------
See [https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS Stable release and LTS]
for detailed info regarding the policies and maintenance of Stable branches.
The [https://wiki.yoctoproject.org/wiki/Releases Release page] contains a list of all
releases of the Yocto Project. Versions in grey are no longer actively maintained with
security patches, but well-tested patches may still be accepted for them for
significant issues.

24
bitbake/SECURITY.md Normal file
View File

@@ -0,0 +1,24 @@
How to Report a Potential Vulnerability?
========================================
If you would like to report a public issue (for example, one with a released
CVE number), please report it using the
[https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Security Security Bugzilla].
If you have a patch ready, submit it following the same procedure as any other
patch as described in README.md.
If you are dealing with a not-yet released or urgent issue, please send a
message to security AT yoctoproject DOT org, including as many details as
possible: the layer or software module affected, the recipe and its version,
and any example code, if available.
Branches maintained with security fixes
---------------------------------------
See [https://wiki.yoctoproject.org/wiki/Stable_Release_and_LTS Stable release and LTS]
for detailed info regarding the policies and maintenance of Stable branches.
The [https://wiki.yoctoproject.org/wiki/Releases Release page] contains a list of all
releases of the Yocto Project. Versions in grey are no longer actively maintained with
security patches, but well-tested patches may still be accepted for them for
significant issues.

View File

@@ -15,6 +15,13 @@ import sys
if sys.version_info < (3, 5, 0):
raise RuntimeError("Sorry, python 3.5.0 or later is required for this version of bitbake")
if sys.version_info < (3, 10, 0):
# With python 3.8 and 3.9, we see errors of "libgcc_s.so.1 must be installed for pthread_cancel to work"
# https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work
# https://bugs.ams1.psf.io/issue42888
# so ensure libgcc_s is loaded early on
import ctypes
libgcc_s = ctypes.CDLL('libgcc_s.so.1')
class BBHandledException(Exception):
"""

View File

@@ -301,6 +301,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
value += "\n_remove of %s" % r
deps |= r2.references
deps = deps | (keys & r2.execs)
value = handle_contains(value, r2.contains, d)
return value
if "vardepvalue" in varflags:

View File

@@ -229,9 +229,10 @@ class diskMonitor:
freeInode = st.f_favail
if minInode and freeInode < minInode:
# Some filesystems use dynamic inodes so can't run out
# (e.g. btrfs). This is reported by the inode count being 0.
if st.f_files == 0:
# Some filesystems use dynamic inodes so can't run out.
# This is reported by the inode count being 0 (btrfs) or the free
# inode count being -1 (cephfs).
if st.f_files == 0 or st.f_favail == -1:
self.devDict[k][2] = None
continue
# Always show warning, the self.checked would always be False if the action is WARN

View File

@@ -1975,11 +1975,19 @@ class RunQueueExecute:
self.setbuildable(revdep)
logger.debug(1, "Marking task %s as buildable", revdep)
for t in self.sq_deferred.copy():
found = None
for t in sorted(self.sq_deferred.copy()):
if self.sq_deferred[t] == task:
logger.debug(2, "Deferred task %s now buildable" % t)
del self.sq_deferred[t]
update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
# Allow the next deferred task to run. Any other deferred tasks should be deferred after that task.
# We shouldn't allow all to run at once as it is prone to races.
if not found:
bb.note("Deferred task %s now buildable" % t)
del self.sq_deferred[t]
update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
found = t
else:
bb.note("Deferring %s after %s" % (t, found))
self.sq_deferred[t] = found
def task_complete(self, task):
self.stats.taskCompleted()

View File

@@ -318,7 +318,8 @@ class SignatureGeneratorBasic(SignatureGenerator):
else:
sigfile = stampbase + "." + task + ".sigbasedata" + "." + self.basehash[tid]
bb.utils.mkdirhier(os.path.dirname(sigfile))
with bb.utils.umask(0o002):
bb.utils.mkdirhier(os.path.dirname(sigfile))
data = {}
data['task'] = task

View File

@@ -412,6 +412,32 @@ esac
# Check final value
self.assertEqual(self.d.getVar('ANOTHERVAR').split(), ['anothervalue', 'yetanothervalue', 'lastone'])
def test_contains_vardeps_override_operators(self):
# Check override operators handle dependencies correctly with the contains functionality
expr_plain = 'testval'
expr_prepend = '${@bb.utils.filter("TESTVAR1", "testval1", d)} '
expr_append = ' ${@bb.utils.filter("TESTVAR2", "testval2", d)}'
expr_remove = '${@bb.utils.contains("TESTVAR3", "no-testval", "testval", "", d)}'
# Check dependencies
self.d.setVar('ANOTHERVAR', expr_plain)
self.d.prependVar('ANOTHERVAR', expr_prepend)
self.d.appendVar('ANOTHERVAR', expr_append)
self.d.setVar('ANOTHERVAR:remove', expr_remove)
self.d.setVar('TESTVAR1', 'blah')
self.d.setVar('TESTVAR2', 'testval2')
self.d.setVar('TESTVAR3', 'no-testval')
deps, values = bb.data.build_dependencies("ANOTHERVAR", set(self.d.keys()), set(), set(), self.d)
self.assertEqual(sorted(values.splitlines()),
sorted([
expr_prepend + expr_plain + expr_append,
'_remove of ' + expr_remove,
'TESTVAR1{testval1} = Unset',
'TESTVAR2{testval2} = Set',
'TESTVAR3{no-testval} = Set',
]))
# Check final value
self.assertEqual(self.d.getVar('ANOTHERVAR').split(), ['testval2'])
#Currently no wildcard support
#def test_vardeps_wildcards(self):
# self.d.setVar("oe_libinstall", "echo test")

View File

@@ -969,6 +969,17 @@ def which(path, item, direction = 0, history = False, executable=False):
return "", hist
return ""
@contextmanager
def umask(new_mask):
"""
Context manager to set the umask to a specific mask, and restore it afterwards.
"""
current_mask = os.umask(new_mask)
try:
yield
finally:
os.umask(current_mask)
def to_boolean(string, default=None):
if not string:
return default

View File

@@ -206,6 +206,7 @@ class LayerIndexPlugin(ActionPlugin):
"""
args.show_only = True
args.ignore = []
args.shallow = True
self.do_layerindex_fetch(args)
def register_commands(self, sp):

View File

@@ -11,7 +11,7 @@ import os
import re
import logging
import json
import subprocess
import glob
from collections import Counter
from orm.models import Project, ProjectTarget, Build, Layer_Version
@@ -227,20 +227,18 @@ class XhrSetDefaultImageUrl(View):
# same logical name
# * Each project that uses a layer will have its own
# LayerVersion and Project Layer for it
# * During the Paroject delete process, when the last
# * During the Project delete process, when the last
# LayerVersion for a 'local_source_dir' layer is deleted
# then the Layer record is deleted to remove orphans
#
def scan_layer_content(layer,layer_version):
# if this is a local layer directory, we can immediately scan its content
if layer.local_source_dir:
if os.path.isdir(layer.local_source_dir):
try:
# recipes-*/*/*.bb
cmd = '%s %s' % ('ls', os.path.join(layer.local_source_dir,'recipes-*/*/*.bb'))
recipes_list = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.STDOUT).stdout.read()
recipes_list = recipes_list.decode("utf-8").strip()
if recipes_list and 'No such' not in recipes_list:
recipes_list = glob.glob(os.path.join(layer.local_source_dir, 'recipes-*/*/*.bb'))
for recipe in recipes_list:
for recipe in recipes_list.split('\n'):
recipe_path = recipe[recipe.rfind('recipes-'):]
recipe_name = recipe[recipe.rfind('/')+1:].replace('.bb','')
@@ -260,6 +258,9 @@ def scan_layer_content(layer,layer_version):
except Exception as e:
logger.warning("ERROR:scan_layer_content: %s" % e)
else:
logger.warning("ERROR: wrong path given")
raise KeyError("local_source_dir")
class XhrLayer(View):
""" Delete, Get, Add and Update Layer information
@@ -456,15 +457,18 @@ class XhrLayer(View):
'layerdetailurl':
layer_dep.get_detailspage_url(project.pk)})
# Scan the layer's content and update components
scan_layer_content(layer,layer_version)
# Only scan_layer_content if layer is local
if layer_data.get('local_source_dir', None):
# Scan the layer's content and update components
scan_layer_content(layer,layer_version)
except Layer_Version.DoesNotExist:
return error_response("layer-dep-not-found")
except Project.DoesNotExist:
return error_response("project-not-found")
except KeyError:
return error_response("incorrect-parameters")
except KeyError as e:
_log("KeyError: %s" % e)
return error_response(f"incorrect-parameters")
return JsonResponse({'error': "ok",
'imported_layer': {

View File

@@ -8652,6 +8652,8 @@ In order to run tests, you need to do the following:
- Be sure to use an absolute path when calling this script
with sudo.
- Ensure that your host has the package ``iptables`` installed.
- The package recipe ``qemu-helper-native`` is required to run
this script. Build the package using the following command:
::

View File

@@ -659,7 +659,7 @@ Follow these steps to locate and download a particular tarball:
Using the Downloads Page
------------------------
The :yocto_home:`Yocto Project Website <>` uses a "DOWNLOADS" page
The :yocto_home:`Yocto Project Website <>` uses a "RELEASES" page
from which you can locate and download tarballs of any Yocto Project
release. Rather than Git repositories, these files represent snapshot
tarballs similar to the tarballs located in the Index of Releases
@@ -676,12 +676,13 @@ Releases <#accessing-index-of-releases>`__" section.
1. *Go to the Yocto Project Website:* Open The
:yocto_home:`Yocto Project Website <>` in your browser.
2. *Get to the Downloads Area:* Select the "DOWNLOADS" item from the
pull-down "SOFTWARE" tab menu near the top of the page.
#. *Get to the Downloads Area:* Select the "RELEASES" item from the
pull-down "DEVELOPMENT" tab menu near the top of the page.
3. *Select a Yocto Project Release:* Use the menu next to "RELEASE" to
display and choose a recent or past supported Yocto Project release
(e.g. &DISTRO_NAME_NO_CAP;, &DISTRO_NAME_NO_CAP_MINUS_ONE;, and so forth).
#. *Select a Yocto Project Release:* On the top of the "RELEASE" page currently
supported releases are displayed, further down past supported Yocto Project
releases are visible. The "Download" links in the rows of the table there
will lead to the download tarballs for the release.
.. note::
@@ -691,9 +692,9 @@ Releases <#accessing-index-of-releases>`__" section.
You can use the "RELEASE ARCHIVE" link to reveal a menu of all Yocto
Project releases.
4. *Download Tools or Board Support Packages (BSPs):* From the
"DOWNLOADS" page, you can download tools or BSPs as well. Just scroll
down the page and look for what you need.
#. *Download Tools or Board Support Packages (BSPs):* Next to the tarballs you
will find download tools or BSPs as well. Just select a Yocto Project
release and look for what you need.
Accessing Nightly Builds
------------------------

View File

@@ -1,13 +1,13 @@
DISTRO : "3.1.26"
DISTRO : "3.1.33"
DISTRO_NAME_NO_CAP : "dunfell"
DISTRO_NAME : "Dunfell"
DISTRO_NAME_NO_CAP_MINUS_ONE : "zeus"
YOCTO_DOC_VERSION : "3.1.26"
YOCTO_DOC_VERSION : "3.1.33"
YOCTO_DOC_VERSION_MINUS_ONE : "3.0.4"
DISTRO_REL_TAG : "yocto-3.1.26"
DOCCONF_VERSION : "3.1.26"
DISTRO_REL_TAG : "yocto-3.1.33"
DOCCONF_VERSION : "3.1.33"
BITBAKE_SERIES : "1.46"
POKYVERSION : "23.0.26"
POKYVERSION : "23.0.33"
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
YOCTO_AB_URL : "https://autobuilder.yoctoproject.org"

View File

@@ -1315,16 +1315,6 @@ The following list shows the tests you can list with the ``WARN_QA`` and
automatically get these versions. Consequently, you should only need
to explicitly add dependencies to binary driver recipes.
.. _ref-classes-insserv:
``insserv.bbclass``
===================
The ``insserv`` class uses the ``insserv`` utility to update the order
of symbolic links in ``/etc/rc?.d/`` within an image based on
dependencies specified by LSB headers in the ``init.d`` scripts
themselves.
.. _ref-classes-kernel:
``kernel.bbclass``

View File

@@ -14,16 +14,17 @@ image you want.
Building an image without GNU General Public License Version 3
(GPLv3), GNU Lesser General Public License Version 3 (LGPLv3), and
the GNU Affero General Public License Version 3 (AGPL-3.0) components
is only supported for minimal and base images. Furthermore, if you
are going to build an image using non-GPLv3 and similarly licensed
components, you must make the following changes in the ``local.conf``
file before using the BitBake command to build the minimal or base
image:
::
is only tested for core-image-minimal image. Furthermore, if you would like to
build an image and verify that it does not include GPLv3 and similarly licensed
components, you must make the following changes in the image recipe
file before using the BitBake command to build the image:
1. Comment out the EXTRA_IMAGE_FEATURES line
2. Set INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0*"
Alternatively, you can adjust ``local.conf`` file, repeating and adjusting the line
for all images where the license restriction must apply:
INCOMPATIBLE_LICENSE_pn-your-image-name = "GPL-3.0* LGPL-3.0*"
From within the ``poky`` Git repository, you can use the following
command to display the list of directories within the :term:`Source Directory`

View File

@@ -138,7 +138,7 @@ consists of the following pieces:
piece of software. The test allows the packages to be be run within a
target image.
- ``oe-selftest``: Tests combination BitBake invocations. These tests
- ``oe-selftest``: Tests combinations of BitBake invocations. These tests
operate outside the OpenEmbedded build system itself. The
``oe-selftest`` can run all tests by default or can run selected
tests or test suites.

View File

@@ -34,19 +34,31 @@ and conceptual information in the :doc:`../overview-manual/overview-manual`.
Supported Linux Distributions
=============================
Currently, the Yocto Project is supported on the following
distributions:
Currently, the &DISTRO; release ("&DISTRO_NAME;") of the Yocto Project is
supported on the following distributions:
- Ubuntu 16.04 (LTS)
- Ubuntu 20.04 (LTS)
- Ubuntu 22.04 (LTS)
- Fedora 38
- Debian GNU/Linux 11.x (Bullseye)
- AlmaLinux 8
The following distribution versions are still tested even though the
organizations publishing them no longer make updates publicly available:
- Ubuntu 18.04 (LTS)
Finally, here are the distribution versions which were previously
tested on former revisions of "&DISTRO_NAME;", but no longer are:
- Ubuntu 16.04 (LTS)
- Ubuntu 19.04
- Ubuntu 20.04
- Ubuntu 22.04
- Fedora 28
- Fedora 29
@@ -65,26 +77,24 @@ distributions:
- Fedora 36
- Fedora 37
- CentOS 7.x
- CentOS 8.x
- Debian GNU/Linux 8.x (Jessie)
- Debian GNU/Linux 9.x (Stretch)
- Debian GNU/Linux 10.x (Buster)
- Debian GNU/Linux 11.x (Bullseye)
- OpenSUSE Leap 15.1
- OpenSUSE Leap 15.2
- OpenSUSE Leap 15.3
- AlmaLinux 8.5
- AlmaLinux 8.7
.. note::
- While the Yocto Project Team attempts to ensure all Yocto Project

View File

@@ -3337,9 +3337,18 @@ system and gives an overview of their function and contents.
:term:`INCOMPATIBLE_LICENSE`
Specifies a space-separated list of license names (as they would
appear in :term:`LICENSE`) that should be excluded
from the build. Recipes that provide no alternatives to listed
from the build (if set globally), or from an image (if set locally
in an image recipe).
When the variable is set globally, recipes that provide no alternatives to listed
incompatible licenses are not built. Packages that are individually
licensed with the specified incompatible licenses will be deleted.
Most of the time this does not allow a feasible build (because it becomes impossible
to satisfy build time dependencies), so the recommended way to
implement license restrictions is to set the variable in specific
image recipes where the restrictions must apply. That way there
are no build time restrictions, but the license check is still
performed when the image's filesystem is assembled from packages.
.. note::

View File

@@ -1,6 +1,6 @@
DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "3.1.26"
DISTRO_VERSION = "3.1.33"
DISTRO_CODENAME = "dunfell"
SDK_VENDOR = "-pokysdk"
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"
@@ -43,29 +43,13 @@ SANITY_TESTED_DISTROS ?= " \
poky-2.7 \n \
poky-3.0 \n \
poky-3.1 \n \
ubuntu-16.04 \n \
ubuntu-18.04 \n \
ubuntu-19.04 \n \
ubuntu-20.04 \n \
ubuntu-22.04 \n \
fedora-30 \n \
fedora-31 \n \
fedora-32 \n \
fedora-33 \n \
fedora-34 \n \
fedora-35 \n \
fedora-36 \n \
centos-7 \n \
centos-8 \n \
debian-8 \n \
debian-9 \n \
debian-10 \n \
fedora-37 \n \
debian-11 \n \
opensuseleap-15.1 \n \
opensuseleap-15.2 \n \
opensuseleap-15.3 \n \
almalinux-8.5 \n \
almalinux-8.7 \n \
almalinux-8.8 \n \
"
# add poky sanity bbclass
INHERIT += "poky-sanity"

View File

@@ -26,7 +26,7 @@ CVE_PRODUCT ??= "${BPN}"
CVE_VERSION ??= "${PV}"
CVE_CHECK_DB_DIR ?= "${DL_DIR}/CVE_CHECK"
CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_1.1.db"
CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2.db"
CVE_CHECK_DB_FILE_LOCK ?= "${CVE_CHECK_DB_FILE}.lock"
CVE_CHECK_LOG ?= "${T}/cve.log"
@@ -97,6 +97,8 @@ def generate_json_report(d, out_path, link_path):
cve_check_merge_jsons(summary, data)
filename = f.readline()
summary["package"].sort(key=lambda d: d['name'])
with open(out_path, "w") as f:
json.dump(summary, f, indent=2)
@@ -154,7 +156,7 @@ python do_cve_check () {
}
addtask cve_check before do_build
do_cve_check[depends] = "cve-update-db-native:do_fetch"
do_cve_check[depends] = "cve-update-nvd2-native:do_fetch"
do_cve_check[nostamp] = "1"
python cve_check_cleanup () {

View File

@@ -118,7 +118,7 @@ go_do_install() {
tar -C ${B} -cf - --exclude-vcs --exclude '*.test' --exclude 'testdata' pkg | \
tar -C ${D}${libdir}/go --no-same-owner -xf -
if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
if ls ${B}/${GO_BUILD_BINDIR}/* >/dev/null 2>/dev/null ; then
install -d ${D}${bindir}
install -m 0755 ${B}/${GO_BUILD_BINDIR}/* ${D}${bindir}/
fi

View File

@@ -1,5 +1,7 @@
inherit kernel-uboot kernel-artifact-names uboot-sign
KERNEL_IMAGETYPE_REPLACEMENT = ""
python __anonymous () {
kerneltypes = d.getVar('KERNEL_IMAGETYPES') or ""
if 'fitImage' in kerneltypes.split():
@@ -21,6 +23,8 @@ python __anonymous () {
else:
replacementtype = "zImage"
d.setVar("KERNEL_IMAGETYPE_REPLACEMENT", replacementtype)
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
@@ -45,6 +49,8 @@ python __anonymous () {
if d.getVar('UBOOT_SIGN_ENABLE') == "1" and d.getVar('UBOOT_DTB_BINARY'):
uboot_pn = d.getVar('PREFERRED_PROVIDER_u-boot') or 'u-boot'
d.appendVarFlag('do_assemble_fitimage', 'depends', ' %s:do_populate_sysroot' % uboot_pn)
if d.getVar('INITRAMFS_IMAGE_BUNDLE') == "1":
d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' %s:do_populate_sysroot' % uboot_pn)
}
# Options for the device tree compiler passed to mkimage '-D' feature:
@@ -180,6 +186,43 @@ fitimage_emit_section_dtb() {
EOF
}
#
# Emit the fitImage ITS u-boot script section
#
# $1 ... .its filename
# $2 ... Image counter
# $3 ... Path to boot script image
fitimage_emit_section_boot_script() {
bootscr_csum="${FIT_HASH_ALG}"
bootscr_sign_algo="${FIT_SIGN_ALG}"
bootscr_sign_keyname="${UBOOT_SIGN_IMG_KEYNAME}"
cat << EOF >> $1
bootscr-$2 {
description = "U-boot script";
data = /incbin/("$3");
type = "script";
arch = "${UBOOT_ARCH}";
compression = "none";
hash-1 {
algo = "$bootscr_csum";
};
};
EOF
if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a -n "$bootscr_sign_keyname" ] ; then
sed -i '$ d' $1
cat << EOF >> $1
signature-1 {
algo = "$bootscr_csum,$bootscr_sign_algo";
key-name-hint = "$bootscr_sign_keyname";
};
};
EOF
fi
}
#
# Emit the fitImage ITS setup section
#
@@ -250,8 +293,9 @@ EOF
# $2 ... Linux kernel ID
# $3 ... DTB image name
# $4 ... ramdisk ID
# $5 ... config ID
# $6 ... default flag
# $5 ... u-boot script ID
# $6 ... config ID
# $7 ... default flag
fitimage_emit_section_config() {
conf_csum="${FIT_HASH_ALG}"
@@ -267,6 +311,7 @@ fitimage_emit_section_config() {
kernel_line=""
fdt_line=""
ramdisk_line=""
bootscr_line=""
setup_line=""
default_line=""
@@ -289,21 +334,28 @@ fitimage_emit_section_config() {
fi
if [ -n "${5}" ]; then
conf_desc="${conf_desc}${sep}setup"
setup_line="setup = \"setup-${5}\";"
conf_desc="${conf_desc}${sep}u-boot script"
sep=", "
bootscr_line="bootscr = \"bootscr-${5}\";"
fi
if [ "${6}" = "1" ]; then
if [ -n "${6}" ]; then
conf_desc="${conf_desc}${sep}setup"
setup_line="setup = \"setup-${6}\";"
fi
if [ "${7}" = "1" ]; then
default_line="default = \"conf-${3}\";"
fi
cat << EOF >> ${1}
${default_line}
conf-${3} {
description = "${6} ${conf_desc}";
description = "${7} ${conf_desc}";
${kernel_line}
${fdt_line}
${ramdisk_line}
${bootscr_line}
${setup_line}
hash-1 {
algo = "${conf_csum}";
@@ -331,6 +383,11 @@ EOF
fi
if [ -n "${5}" ]; then
sign_line="${sign_line}${sep}\"bootscr\""
sep=", "
fi
if [ -n "${6}" ]; then
sign_line="${sign_line}${sep}\"setup\""
fi
@@ -363,6 +420,7 @@ fitimage_assemble() {
DTBS=""
ramdiskcount=${3}
setupcount=""
bootscr_id=""
rm -f ${1} arch/${ARCH}/boot/${2}
fitimage_emit_fit_header ${1}
@@ -373,7 +431,7 @@ fitimage_assemble() {
fitimage_emit_section_maint ${1} imagestart
uboot_prep_kimage
fitimage_emit_section_kernel ${1} "${kernelcount}" linux.bin "${linux_comp}"
fitimage_emit_section_kernel $1 $kernelcount linux.bin "$linux_comp"
#
# Step 2: Prepare a DTB image section
@@ -407,7 +465,21 @@ fitimage_assemble() {
fi
#
# Step 3: Prepare a setup section. (For x86)
# Step 3: Prepare a u-boot script section
#
if [ -n "${UBOOT_ENV}" ] && [ -d "${STAGING_DIR_HOST}/boot" ]; then
if [ -e "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY}" ]; then
cp ${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} ${B}
bootscr_id="${UBOOT_ENV_BINARY}"
fitimage_emit_section_boot_script ${1} "${bootscr_id}" ${UBOOT_ENV_BINARY}
else
bbwarn "${STAGING_DIR_HOST}/boot/${UBOOT_ENV_BINARY} not found."
fi
fi
#
# Step 4: Prepare a setup section. (For x86)
#
if [ -e arch/${ARCH}/boot/setup.bin ]; then
setupcount=1
@@ -415,9 +487,9 @@ fitimage_assemble() {
fi
#
# Step 4: Prepare a ramdisk section.
# Step 5: Prepare a ramdisk section.
#
if [ "x${ramdiskcount}" = "x1" ] ; then
if [ "x${ramdiskcount}" = "x1" ] && [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then
# Find and use the first initramfs image archive type we find
for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.gz ext2.gz cpio; do
initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.${img}"
@@ -438,7 +510,7 @@ fitimage_assemble() {
fi
#
# Step 5: Prepare a configurations section
# Step 6: Prepare a configurations section
#
fitimage_emit_section_maint ${1} confstart
@@ -447,9 +519,9 @@ fitimage_assemble() {
for DTB in ${DTBS}; do
dtb_ext=${DTB##*.}
if [ "${dtb_ext}" = "dtbo" ]; then
fitimage_emit_section_config ${1} "" "${DTB}" "" "" "`expr ${i} = ${dtbcount}`"
fitimage_emit_section_config ${1} "" "${DTB}" "" "${bootscr_id}" "" "`expr ${i} = ${dtbcount}`"
else
fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`"
fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${bootscr_id}" "${setupcount}" "`expr ${i} = ${dtbcount}`"
fi
i=`expr ${i} + 1`
done
@@ -460,7 +532,7 @@ fitimage_assemble() {
fitimage_emit_section_maint ${1} fitend
#
# Step 6: Assemble the image
# Step 7: Assemble the image
#
uboot-mkimage \
${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
@@ -468,7 +540,7 @@ fitimage_assemble() {
arch/${ARCH}/boot/${2}
#
# Step 7: Sign the image and add public key to U-Boot dtb
# Step 8: Sign the image and add public key to U-Boot dtb
#
if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
add_key_to_u_boot=""
@@ -500,7 +572,11 @@ do_assemble_fitimage_initramfs() {
if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \
test -n "${INITRAMFS_IMAGE}" ; then
cd ${B}
fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1
if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage ""
else
fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its fitImage-${INITRAMFS_IMAGE} 1
fi
fi
}
@@ -511,22 +587,32 @@ kernel_do_deploy[vardepsexclude] = "DATETIME"
kernel_do_deploy_append() {
# Update deploy directory
if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
echo "Copying fit-image.its source file..."
install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its"
ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}"
if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then
echo "Copying fit-image.its source file..."
install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its"
if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then
ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}"
fi
echo "Copying linux.bin file..."
install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}.bin
ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}"
echo "Copying linux.bin file..."
install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}.bin
if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then
ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}"
fi
fi
if [ -n "${INITRAMFS_IMAGE}" ]; then
echo "Copying fit-image-${INITRAMFS_IMAGE}.its source file..."
install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its"
ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}"
echo "Copying fitImage-${INITRAMFS_IMAGE} file..."
install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin"
ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}"
if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then
echo "Copying fitImage-${INITRAMFS_IMAGE} file..."
install -m 0644 ${B}/arch/${ARCH}/boot/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin"
if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then
ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.bin "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}"
fi
fi
fi
if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then
# UBOOT_DTB_IMAGE is a realfile, but we can't use
@@ -536,3 +622,13 @@ kernel_do_deploy_append() {
fi
fi
}
# The function below performs the following in case of initramfs bundles:
# - Removes do_assemble_fitimage. FIT generation is done through
# do_assemble_fitimage_initramfs. do_assemble_fitimage is not needed
# and should not be part of the tasks to be executed.
python () {
d.appendVarFlag('do_compile', 'vardeps', ' INITRAMFS_IMAGE_BUNDLE')
if d.getVar('INITRAMFS_IMAGE_BUNDLE') == "1":
bb.build.deltask('do_assemble_fitimage', d)
}

View File

@@ -143,13 +143,14 @@ do_unpack[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILD
do_clean[cleandirs] += " ${S} ${STAGING_KERNEL_DIR} ${B} ${STAGING_KERNEL_BUILDDIR}"
python do_symlink_kernsrc () {
s = d.getVar("S")
if s[-1] == '/':
# drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as directory name and fail
s=s[:-1]
kernsrc = d.getVar("STAGING_KERNEL_DIR")
if s != kernsrc:
bb.utils.mkdirhier(kernsrc)
bb.utils.remove(kernsrc, recurse=True)
if s[-1] == '/':
# drop trailing slash, so that os.symlink(kernsrc, s) doesn't use s as
# directory name and fail
s = s[:-1]
if d.getVar("EXTERNALSRC"):
# With EXTERNALSRC S will not be wiped so we can symlink to it
os.symlink(s, kernsrc)
@@ -404,8 +405,8 @@ kernel_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
oe_runmake DEPMOD=echo MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install
rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
rm -f "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
# If the kernel/ directory is empty remove it to prevent QA issues
rmdir --ignore-fail-on-non-empty "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel"
else
@@ -417,12 +418,26 @@ kernel_do_install() {
#
install -d ${D}/${KERNEL_IMAGEDEST}
install -d ${D}/boot
#
# When including an initramfs bundle inside a FIT image, the fitImage is created after the install task
# by do_assemble_fitimage_initramfs.
# This happens after the generation of the initramfs bundle (done by do_bundle_initramfs).
# So, at the level of the install task we should not try to install the fitImage. fitImage is still not
# generated yet.
# After the generation of the fitImage, the deploy task copies the fitImage from the build directory to
# the deploy folder.
#
for imageType in ${KERNEL_IMAGETYPES} ; do
install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} ${D}/${KERNEL_IMAGEDEST}/${imageType}-${KERNEL_VERSION}
if [ "${KERNEL_PACKAGE_NAME}" = "kernel" ]; then
ln -sf ${imageType}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${imageType}
if [ $imageType != "fitImage" ] || [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ] ; then
install -m 0644 ${KERNEL_OUTPUT_DIR}/${imageType} ${D}/${KERNEL_IMAGEDEST}/${imageType}-${KERNEL_VERSION}
if [ "${KERNEL_PACKAGE_NAME}" = "kernel" ]; then
ln -sf ${imageType}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${imageType}
fi
fi
done
install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}

View File

@@ -1,6 +1,6 @@
# Zap the root password if debug-tweaks feature is not enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}'
# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
@@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
# Create /etc/timestamp during image construction to give a reasonably sane default time setting
ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; "
# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
@@ -26,7 +26,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only
APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}'
# Generates test data file with data store variables expanded in json format
ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; "
# Write manifest
IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"

View File

@@ -28,7 +28,7 @@
ROOTFS_DEBUG_FILES ?= ""
ROOTFS_DEBUG_FILES[doc] = "Lists additional files or directories to be installed with 'cp -a' in the format 'source1 target1;source2 target2;...'"
ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files ;"
ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files;"
rootfs_debug_files () {
#!/bin/sh -e
echo "${ROOTFS_DEBUG_FILES}" | sed -e 's/;/\n/g' | while read source target mode; do

View File

@@ -99,30 +99,9 @@ TESTIMAGE_DUMP_DIR ?= "${LOG_DIR}/runtime-hostdump/"
TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
testimage_dump_target () {
top -bn1
ps
free
df
# The next command will export the default gateway IP
export DEFAULT_GATEWAY=$(ip route | awk '/default/ { print $3}')
ping -c3 $DEFAULT_GATEWAY
dmesg
netstat -an
ip address
# Next command will dump logs from /var/log/
find /var/log/ -type f 2>/dev/null -exec echo "====================" \; -exec echo {} \; -exec echo "====================" \; -exec cat {} \; -exec echo "" \;
}
testimage_dump_host () {
top -bn1
iostat -x -z -N -d -p ALL 20 2
ps -ef
free
df
memstat
dmesg
ip -s link
netstat -an
}
python do_testimage() {

View File

@@ -34,6 +34,8 @@ python uninative_event_fetchloader() {
with open(loaderchksum, "r") as f:
readchksum = f.read().strip()
if readchksum == chksum:
if "uninative" not in d.getVar("SSTATEPOSTUNPACKFUNCS"):
enable_uninative(d)
return
import subprocess
@@ -167,5 +169,7 @@ python uninative_changeinterp () {
if not elf.isDynamic():
continue
os.chmod(f, s[stat.ST_MODE] | stat.S_IWUSR)
subprocess.check_output(("patchelf-uninative", "--set-interpreter", d.getVar("UNINATIVE_LOADER"), f), stderr=subprocess.STDOUT)
os.chmod(f, s[stat.ST_MODE])
}

View File

@@ -41,7 +41,7 @@ def update_useradd_static_config(d):
def handle_missing_id(id, type, pkg, files, var, value):
# For backwards compatibility we accept "1" in addition to "error"
error_dynamic = d.getVar('USERADD_ERROR_DYNAMIC')
msg = "%s - %s: %sname %s does not have a static ID defined." % (d.getVar('PN'), pkg, type, id)
msg = 'Recipe %s, package %s: %sname "%s" does not have a static ID defined.' % (d.getVar('PN'), pkg, type, id)
if files:
msg += " Add %s to one of these files: %s" % (id, files)
else:

View File

@@ -897,7 +897,7 @@ BB_HASHCONFIG_WHITELIST ?= "${BB_HASHEXCLUDE_COMMON} DATE TIME SSH_AGENT_PID \
PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \
HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \
BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT"
BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT BB_NICE_LEVEL"
BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \
file-checksums python func task export unexport noexec nostamp dirs cleandirs \

View File

@@ -26,6 +26,7 @@ PTESTS_FAST = "\
liberror-perl-ptest \
libmodule-build-perl-ptest \
libpcre-ptest \
libpng-ptest \
libtimedate-perl-ptest \
libtest-needs-perl-ptest \
liburi-perl-ptest \

View File

@@ -6,10 +6,10 @@
# to the distro running on the build machine.
#
UNINATIVE_MAXGLIBCVERSION = "2.36"
UNINATIVE_VERSION = "3.7"
UNINATIVE_MAXGLIBCVERSION = "2.39"
UNINATIVE_VERSION = "4.4"
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
UNINATIVE_CHECKSUM[aarch64] ?= "6a29bcae4b5b716d2d520e18800b33943b65f8a835eac1ff8793fc5ee65b4be6"
UNINATIVE_CHECKSUM[i686] ?= "3f6d52e64996570c716108d49f8108baccf499a283bbefae438c7266b7a93305"
UNINATIVE_CHECKSUM[x86_64] ?= "b110bf2e10fe420f5ca2f3ec55f048ee5f0a54c7e34856a3594e51eb2aea0570"
UNINATIVE_CHECKSUM[aarch64] ?= "b61876130f494f75092f21086b4a64ea5fb064045769bf1d32e9cb6af17ea8ec"
UNINATIVE_CHECKSUM[i686] ?= "9f28627828f0082cc0344eede4d9a861a9a064bfa8f36e072e46212f0fe45fcc"
UNINATIVE_CHECKSUM[x86_64] ?= "d81c54284be2bb886931fc87281d58177a2cd381cf99d1981f8923039a72a302"

View File

@@ -37,6 +37,7 @@ SPDXLICENSEMAP[GPL-3.0-only] = "GPL-3.0"
SPDXLICENSEMAP[LGPLv2] = "LGPL-2.0"
SPDXLICENSEMAP[LGPLv2+] = "LGPL-2.0+"
SPDXLICENSEMAP[LGPLv2.0] = "LGPL-2.0"
SPDXLICENSEMAP[LGPLv2.0+] = "LGPL-2.0+"
SPDXLICENSEMAP[LGPL-2.0-only] = "LGPL-2.0"
SPDXLICENSEMAP[LGPL2.1] = "LGPL-2.1"
SPDXLICENSEMAP[LGPLv2.1] = "LGPL-2.1"

View File

@@ -75,7 +75,7 @@ def cve_check_merge_jsons(output, data):
for product in output["package"]:
if product["name"] == data["package"][0]["name"]:
bb.error("Error adding the same package twice")
bb.error("Error adding the same package %s twice" % product["name"])
return
output["package"].append(data["package"][0])
@@ -114,11 +114,6 @@ def get_patched_cves(d):
for url in oe.patch.src_patches(d):
patch_file = bb.fetch.decodeurl(url)[2]
# Remote compressed patches may not be unpacked, so silently ignore them
if not os.path.isfile(patch_file):
bb.warn("%s does not exist, cannot extract CVE list" % patch_file)
continue
# Check patch file name for CVE ID
fname_match = cve_file_name_match.search(patch_file)
if fname_match:
@@ -126,6 +121,12 @@ def get_patched_cves(d):
patched_cves.add(cve)
bb.debug(2, "Found CVE %s from patch file name %s" % (cve, patch_file))
# Remote patches won't be present and compressed patches won't be
# unpacked, so say we're not scanning them
if not os.path.isfile(patch_file):
bb.note("%s is remote or compressed, not scanning content" % patch_file)
continue
with open(patch_file, "r", encoding="utf-8") as f:
try:
patch_text = f.read()

View File

@@ -2,6 +2,9 @@
# SPDX-License-Identifier: GPL-2.0-only
#
import os
import shlex
import subprocess
import oe.path
import oe.types
@@ -24,7 +27,6 @@ class CmdError(bb.BBHandledException):
def runcmd(args, dir = None):
import pipes
import subprocess
if dir:
@@ -35,7 +37,7 @@ def runcmd(args, dir = None):
# print("cwd: %s -> %s" % (olddir, dir))
try:
args = [ pipes.quote(str(arg)) for arg in args ]
args = [ shlex.quote(str(arg)) for arg in args ]
cmd = " ".join(args)
# print("cmd: %s" % cmd)
(exitstatus, output) = subprocess.getstatusoutput(cmd)

View File

@@ -480,8 +480,10 @@ def OEOuthashBasic(path, sigfile, task, d):
if "package_write_" in task or task == "package_qa":
include_owners = False
include_timestamps = False
include_root = True
if task == "package":
include_timestamps = d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1'
include_root = False
extra_content = d.getVar('HASHEQUIV_HASH_VERSION')
try:
@@ -592,7 +594,8 @@ def OEOuthashBasic(path, sigfile, task, d):
update_hash("\n")
# Process this directory and all its child files
process(root)
if include_root or root != ".":
process(root)
for f in files:
if f == 'fixmepath':
continue

View File

@@ -102,6 +102,10 @@ class Rxvt(XTerminal):
command = 'rxvt -T "{title}" -e {command}'
priority = 1
class URxvt(XTerminal):
command = 'urxvt -T "{title}" -e {command}'
priority = 1
class Screen(Terminal):
command = 'screen -D -m -t "{title}" -S devshell {command}'

View File

@@ -226,6 +226,9 @@ def SSHCall(command, logger, timeout=None, **opts):
endtime = time.time() + timeout
except InterruptedError:
continue
except BlockingIOError:
logger.debug('BlockingIOError')
continue
# process hasn't returned yet
if not eof:

View File

@@ -67,7 +67,7 @@ class LtpTest(LtpTestBase):
def runltp(self, ltp_group):
cmd = '/opt/ltp/runltp -f %s -p -q -r /opt/ltp -l /opt/ltp/results/%s -I 1 -d /opt/ltp' % (ltp_group, ltp_group)
starttime = time.time()
(status, output) = self.target.run(cmd)
(status, output) = self.target.run(cmd, timeout=1200)
endtime = time.time()
with open(os.path.join(self.ltptest_log_dir, "%s-raw.log" % ltp_group), 'w') as f:

View File

@@ -57,8 +57,8 @@ class RpmBasicTest(OERuntimeTestCase):
return
time.sleep(1)
user_pss = [ps for ps in output.split("\n") if u + ' ' in ps]
msg = "There're %s 's process(es) still running: %s".format(u, "\n".join(user_pss))
assertTrue(True, msg=msg)
msg = "User %s has processes still running: %s" % (u, "\n".join(user_pss))
self.fail(msg=msg)
def unset_up_test_user(u):
# ensure no test1 process in running

View File

@@ -185,6 +185,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
self.assertTrue(find, "No version returned for searched recipe. bitbake output: %s" % result.output)
def test_prefile(self):
# Test when the prefile does not exist
result = runCmd('bitbake -r conf/prefile.conf', ignore_status=True)
self.assertEqual(1, result.status, "bitbake didn't error and should have when a specified prefile didn't exist: %s" % result.output)
# Test when the prefile exists
preconf = os.path.join(self.builddir, 'conf/prefile.conf')
self.track_for_cleanup(preconf)
ftools.write_file(preconf ,"TEST_PREFILE=\"prefile\"")
@@ -195,6 +199,10 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
self.assertIn('localconf', result.output)
def test_postfile(self):
# Test when the postfile does not exist
result = runCmd('bitbake -R conf/postfile.conf', ignore_status=True)
self.assertEqual(1, result.status, "bitbake didn't error and should have when a specified postfile didn't exist: %s" % result.output)
# Test when the postfile exists
postconf = os.path.join(self.builddir, 'conf/postfile.conf')
self.track_for_cleanup(postconf)
ftools.write_file(postconf , "TEST_POSTFILE=\"postfile\"")

View File

@@ -8,6 +8,7 @@ import shutil
import tempfile
import glob
import fnmatch
import unittest
import oeqa.utils.ftools as ftools
from oeqa.selftest.case import OESelftestTestCase
@@ -38,6 +39,13 @@ def setUpModule():
canonical_layerpath = os.path.realpath(canonical_layerpath) + '/'
edited_layers.append(layerpath)
oldmetapath = os.path.realpath(layerpath)
# when downloading poky from tar.gz some tests will be skipped (BUG 12389)
try:
runCmd('git rev-parse --is-inside-work-tree', cwd=canonical_layerpath)
except:
raise unittest.SkipTest("devtool tests require folder to be a git repo")
result = runCmd('git rev-parse --show-toplevel', cwd=canonical_layerpath)
oldreporoot = result.output.rstrip()
newmetapath = os.path.join(corecopydir, os.path.relpath(oldmetapath, oldreporoot))

View File

@@ -41,7 +41,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
with contextlib.ExitStack() as s:
# use the base work dir, as the nfs mount, since the recipe directory may not exist
tmpdir = get_bb_var("BASE_WORKDIR")
nfsport, mountport = s.enter_context(unfs_server(tmpdir))
nfsport, mountport = s.enter_context(unfs_server(tmpdir, udp = False))
# build core-image-minimal with required packages
default_installed_packages = [
@@ -61,7 +61,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
bitbake("core-image-minimal")
# start runqemu
qemu = s.enter_context(runqemu("core-image-minimal", runqemuparams = "nographic"))
qemu = s.enter_context(runqemu("core-image-minimal", runqemuparams = "nographic", qemuparams = "-m 1024"))
# validate that SSH is working
status, _ = qemu.run("uname")
@@ -70,7 +70,7 @@ class GlibcSelfTestBase(OESelftestTestCase, OEPTestResultTestCase):
# setup nfs mount
if qemu.run("mkdir -p \"{0}\"".format(tmpdir))[0] != 0:
raise Exception("Failed to setup NFS mount directory on target")
mountcmd = "mount -o noac,nfsvers=3,port={0},udp,mountport={1} \"{2}:{3}\" \"{3}\"".format(nfsport, mountport, qemu.server_ip, tmpdir)
mountcmd = "mount -o noac,nfsvers=3,port={0},mountport={1} \"{2}:{3}\" \"{3}\"".format(nfsport, mountport, qemu.server_ip, tmpdir)
status, output = qemu.run(mountcmd)
if status != 0:
raise Exception("Failed to setup NFS mount on target ({})".format(repr(output)))

View File

@@ -185,14 +185,8 @@ class TestImage(OESelftestTestCase):
self.skipTest('virgl isn\'t working with Centos 7')
if distro and distro == 'centos-8':
self.skipTest('virgl isn\'t working with Centos 8')
if distro and distro == 'fedora-34':
self.skipTest('virgl isn\'t working with Fedora 34')
if distro and distro == 'fedora-35':
self.skipTest('virgl isn\'t working with Fedora 35')
if distro and distro == 'fedora-36':
self.skipTest('virgl isn\'t working with Fedora 36')
if distro and distro == 'fedora-37':
self.skipTest('virgl isn\'t working with Fedora 37')
if distro and distro.startswith('fedora'):
self.skipTest('virgl isn\'t working with Fedora')
if distro and distro == 'opensuseleap-15.0':
self.skipTest('virgl isn\'t working with Opensuse 15.0')
if distro and distro == 'ubuntu-22.04':

View File

@@ -8,7 +8,7 @@ from oeqa.utils.commands import bitbake, get_bb_var, Command
from oeqa.utils.network import get_free_port
@contextlib.contextmanager
def unfs_server(directory, logger = None):
def unfs_server(directory, logger = None, udp = True):
unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native")
if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")):
# build native tool
@@ -22,7 +22,7 @@ def unfs_server(directory, logger = None):
exports.write("{0} (rw,no_root_squash,no_all_squash,insecure)\n".format(directory).encode())
# find some ports for the server
nfsport, mountport = get_free_port(udp = True), get_free_port(udp = True)
nfsport, mountport = get_free_port(udp), get_free_port(udp)
nenv = dict(os.environ)
nenv['PATH'] = "{0}/sbin:{0}/usr/sbin:{0}/usr/bin:".format(unfs_sysroot) + nenv.get('PATH', '')

View File

@@ -0,0 +1,609 @@
From 4ea7bae51f97e49c84dc67ea30b466ca8633b9f6 Mon Sep 17 00:00:00 2001
From: Chris Coulson <chris.coulson@canonical.com>
Date: Thu, 7 Jan 2021 19:21:03 +0000
Subject: kern/parser: Fix a stack buffer overflow
grub_parser_split_cmdline() expands variable names present in the supplied
command line in to their corresponding variable contents and uses a 1 kiB
stack buffer for temporary storage without sufficient bounds checking. If
the function is called with a command line that references a variable with
a sufficiently large payload, it is possible to overflow the stack
buffer via tab completion, corrupt the stack frame and potentially
control execution.
Fixes: CVE-2020-27749
Reported-by: Chris Coulson <chris.coulson@canonical.com>
Signed-off-by: Chris Coulson <chris.coulson@canonical.com>
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=c6c426e5ab6ea715153b72584de6bd8c82f698ec && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=b1c9e9e889e4273fb15712051c887e6078511448 && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=3d157bbd06506b170fde5ec23980c4bf9f7660e2 && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=8bc817014ce3d7a498db44eae33c8b90e2430926 && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=030fb6c4fa354cdbd6a8d6903dfed5d36eaf3cb2 && https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=4ea7bae51f97e49c84dc67ea30b466ca8633b9f6]
CVE: CVE-2020-27749
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
---
grub-core/Makefile.core.def | 1 +
grub-core/kern/buffer.c | 117 +++++++++++++++++++++
grub-core/kern/parser.c | 204 +++++++++++++++++++++++-------------
include/grub/buffer.h | 144 +++++++++++++++++++++++++
4 files changed, 395 insertions(+), 71 deletions(-)
create mode 100644 grub-core/kern/buffer.c
create mode 100644 include/grub/buffer.h
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 651ea2a..823cd57 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -123,6 +123,7 @@ kernel = {
riscv32_efi_startup = kern/riscv/efi/startup.S;
riscv64_efi_startup = kern/riscv/efi/startup.S;
+ common = kern/buffer.c;
common = kern/command.c;
common = kern/corecmd.c;
common = kern/device.c;
diff --git a/grub-core/kern/buffer.c b/grub-core/kern/buffer.c
new file mode 100644
index 0000000..9f5f8b8
--- /dev/null
+++ b/grub-core/kern/buffer.c
@@ -0,0 +1,117 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2021 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/buffer.h>
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/safemath.h>
+#include <grub/types.h>
+
+grub_buffer_t
+grub_buffer_new (grub_size_t sz)
+{
+ struct grub_buffer *ret;
+
+ ret = (struct grub_buffer *) grub_malloc (sizeof (*ret));
+ if (ret == NULL)
+ return NULL;
+
+ ret->data = (grub_uint8_t *) grub_malloc (sz);
+ if (ret->data == NULL)
+ {
+ grub_free (ret);
+ return NULL;
+ }
+
+ ret->sz = sz;
+ ret->pos = 0;
+ ret->used = 0;
+
+ return ret;
+}
+
+void
+grub_buffer_free (grub_buffer_t buf)
+{
+ grub_free (buf->data);
+ grub_free (buf);
+}
+
+grub_err_t
+grub_buffer_ensure_space (grub_buffer_t buf, grub_size_t req)
+{
+ grub_uint8_t *d;
+ grub_size_t newsz = 1;
+
+ /* Is the current buffer size adequate? */
+ if (buf->sz >= req)
+ return GRUB_ERR_NONE;
+
+ /* Find the smallest power-of-2 size that satisfies the request. */
+ while (newsz < req)
+ {
+ if (newsz == 0)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ N_("requested buffer size is too large"));
+ newsz <<= 1;
+ }
+
+ d = (grub_uint8_t *) grub_realloc (buf->data, newsz);
+ if (d == NULL)
+ return grub_errno;
+
+ buf->data = d;
+ buf->sz = newsz;
+
+ return GRUB_ERR_NONE;
+}
+
+void *
+grub_buffer_take_data (grub_buffer_t buf)
+{
+ void *data = buf->data;
+
+ buf->data = NULL;
+ buf->sz = buf->pos = buf->used = 0;
+
+ return data;
+}
+
+void
+grub_buffer_reset (grub_buffer_t buf)
+{
+ buf->pos = buf->used = 0;
+}
+
+grub_err_t
+grub_buffer_advance_read_pos (grub_buffer_t buf, grub_size_t n)
+{
+ grub_size_t newpos;
+
+ if (grub_add (buf->pos, n, &newpos))
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
+
+ if (newpos > buf->used)
+ return grub_error (GRUB_ERR_OUT_OF_RANGE,
+ N_("new read is position beyond the end of the written data"));
+
+ buf->pos = newpos;
+
+ return GRUB_ERR_NONE;
+}
diff --git a/grub-core/kern/parser.c b/grub-core/kern/parser.c
index d1cf061..6ab7aa4 100644
--- a/grub-core/kern/parser.c
+++ b/grub-core/kern/parser.c
@@ -1,7 +1,7 @@
/* parser.c - the part of the parser that can return partial tokens */
/*
* GRUB -- GRand Unified Bootloader
- * Copyright (C) 2005,2007,2009 Free Software Foundation, Inc.
+ * Copyright (C) 2005,2007,2009,2021 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,6 +18,7 @@
*/
#include <grub/parser.h>
+#include <grub/buffer.h>
#include <grub/env.h>
#include <grub/misc.h>
#include <grub/mm.h>
@@ -107,8 +108,8 @@ check_varstate (grub_parser_state_t s)
}
-static void
-add_var (char *varname, char **bp, char **vp,
+static grub_err_t
+add_var (grub_buffer_t varname, grub_buffer_t buf,
grub_parser_state_t state, grub_parser_state_t newstate)
{
const char *val;
@@ -116,17 +117,74 @@ add_var (char *varname, char **bp, char **vp,
/* Check if a variable was being read in and the end of the name
was reached. */
if (!(check_varstate (state) && !check_varstate (newstate)))
- return;
+ return GRUB_ERR_NONE;
+
+ if (grub_buffer_append_char (varname, '\0') != GRUB_ERR_NONE)
+ return grub_errno;
- *((*vp)++) = '\0';
- val = grub_env_get (varname);
- *vp = varname;
+ val = grub_env_get ((const char *) grub_buffer_peek_data (varname));
+ grub_buffer_reset (varname);
if (!val)
- return;
+ return GRUB_ERR_NONE;
/* Insert the contents of the variable in the buffer. */
- for (; *val; val++)
- *((*bp)++) = *val;
+ return grub_buffer_append_data (buf, val, grub_strlen (val));
+}
+
+static grub_err_t
+terminate_arg (grub_buffer_t buffer, int *argc)
+{
+ grub_size_t unread = grub_buffer_get_unread_bytes (buffer);
+
+ if (unread == 0)
+ return GRUB_ERR_NONE;
+
+ if (*(const char *) grub_buffer_peek_data_at (buffer, unread - 1) == '\0')
+ return GRUB_ERR_NONE;
+
+ if (grub_buffer_append_char (buffer, '\0') != GRUB_ERR_NONE)
+ return grub_errno;
+
+ (*argc)++;
+
+ return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+process_char (char c, grub_buffer_t buffer, grub_buffer_t varname,
+ grub_parser_state_t state, int *argc,
+ grub_parser_state_t *newstate)
+{
+ char use;
+
+ *newstate = grub_parser_cmdline_state (state, c, &use);
+
+ /*
+ * If a variable was being processed and this character does
+ * not describe the variable anymore, write the variable to
+ * the buffer.
+ */
+ if (add_var (varname, buffer, state, *newstate) != GRUB_ERR_NONE)
+ return grub_errno;
+
+ if (check_varstate (*newstate))
+ {
+ if (use)
+ return grub_buffer_append_char (varname, use);
+ }
+ else if (*newstate == GRUB_PARSER_STATE_TEXT &&
+ state != GRUB_PARSER_STATE_ESC && grub_isspace (use))
+ {
+ /*
+ * Don't add more than one argument if multiple
+ * spaces are used.
+ */
+ return terminate_arg (buffer, argc);
+ }
+ else if (use)
+ return grub_buffer_append_char (buffer, use);
+
+ return GRUB_ERR_NONE;
}
grub_err_t
@@ -135,24 +193,36 @@ grub_parser_split_cmdline (const char *cmdline,
int *argc, char ***argv)
{
grub_parser_state_t state = GRUB_PARSER_STATE_TEXT;
- /* XXX: Fixed size buffer, perhaps this buffer should be dynamically
- allocated. */
- char buffer[1024];
- char *bp = buffer;
+ grub_buffer_t buffer, varname;
char *rd = (char *) cmdline;
- char varname[200];
- char *vp = varname;
- char *args;
+ char *rp = rd;
int i;
*argc = 0;
*argv = NULL;
+
+ buffer = grub_buffer_new (1024);
+ if (buffer == NULL)
+ return grub_errno;
+
+ varname = grub_buffer_new (200);
+ if (varname == NULL)
+ goto fail;
+
do
{
- if (!rd || !*rd)
+ if (rp == NULL || *rp == '\0')
{
+ if (rd != cmdline)
+ {
+ grub_free (rd);
+ rd = rp = NULL;
+ }
if (getline)
- getline (&rd, 1, getline_data);
+ {
+ getline (&rd, 1, getline_data);
+ rp = rd;
+ }
else
break;
}
@@ -160,39 +230,14 @@ grub_parser_split_cmdline (const char *cmdline,
if (!rd)
break;
- for (; *rd; rd++)
+ for (; *rp != '\0'; rp++)
{
grub_parser_state_t newstate;
- char use;
- newstate = grub_parser_cmdline_state (state, *rd, &use);
+ if (process_char (*rp, buffer, varname, state, argc,
+ &newstate) != GRUB_ERR_NONE)
+ goto fail;
- /* If a variable was being processed and this character does
- not describe the variable anymore, write the variable to
- the buffer. */
- add_var (varname, &bp, &vp, state, newstate);
-
- if (check_varstate (newstate))
- {
- if (use)
- *(vp++) = use;
- }
- else
- {
- if (newstate == GRUB_PARSER_STATE_TEXT
- && state != GRUB_PARSER_STATE_ESC && grub_isspace (use))
- {
- /* Don't add more than one argument if multiple
- spaces are used. */
- if (bp != buffer && *(bp - 1))
- {
- *(bp++) = '\0';
- (*argc)++;
- }
- }
- else if (use)
- *(bp++) = use;
- }
state = newstate;
}
}
@@ -200,43 +245,60 @@ grub_parser_split_cmdline (const char *cmdline,
/* A special case for when the last character was part of a
variable. */
- add_var (varname, &bp, &vp, state, GRUB_PARSER_STATE_TEXT);
+ if (add_var (varname, buffer, state, GRUB_PARSER_STATE_TEXT) != GRUB_ERR_NONE)
+ goto fail;
- if (bp != buffer && *(bp - 1))
- {
- *(bp++) = '\0';
- (*argc)++;
- }
+ /* Ensure that the last argument is terminated. */
+ if (terminate_arg (buffer, argc) != GRUB_ERR_NONE)
+ goto fail;
/* If there are no args, then we're done. */
if (!*argc)
- return 0;
-
- /* Reserve memory for the return values. */
- args = grub_malloc (bp - buffer);
- if (!args)
- return grub_errno;
- grub_memcpy (args, buffer, bp - buffer);
+ {
+ grub_errno = GRUB_ERR_NONE;
+ goto out;
+ }
*argv = grub_calloc (*argc + 1, sizeof (char *));
if (!*argv)
- {
- grub_free (args);
- return grub_errno;
- }
+ goto fail;
/* The arguments are separated with 0's, setup argv so it points to
the right values. */
- bp = args;
for (i = 0; i < *argc; i++)
{
- (*argv)[i] = bp;
- while (*bp)
- bp++;
- bp++;
+ char *arg;
+
+ if (i > 0)
+ {
+ if (grub_buffer_advance_read_pos (buffer, 1) != GRUB_ERR_NONE)
+ goto fail;
+ }
+
+ arg = (char *) grub_buffer_peek_data (buffer);
+ if (arg == NULL ||
+ grub_buffer_advance_read_pos (buffer, grub_strlen (arg)) != GRUB_ERR_NONE)
+ goto fail;
+
+ (*argv)[i] = arg;
}
- return 0;
+ /* Keep memory for the return values. */
+ grub_buffer_take_data (buffer);
+
+ grub_errno = GRUB_ERR_NONE;
+
+ out:
+ if (rd != cmdline)
+ grub_free (rd);
+ grub_buffer_free (buffer);
+ grub_buffer_free (varname);
+
+ return grub_errno;
+
+ fail:
+ grub_free (*argv);
+ goto out;
}
/* Helper for grub_parser_execute. */
diff --git a/include/grub/buffer.h b/include/grub/buffer.h
new file mode 100644
index 0000000..f4b10cf
--- /dev/null
+++ b/include/grub/buffer.h
@@ -0,0 +1,144 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2021 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_BUFFER_H
+#define GRUB_BUFFER_H 1
+
+#include <grub/err.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/safemath.h>
+#include <grub/types.h>
+
+struct grub_buffer
+{
+ grub_uint8_t *data;
+ grub_size_t sz;
+ grub_size_t pos;
+ grub_size_t used;
+};
+
+/*
+ * grub_buffer_t represents a simple variable sized byte buffer with
+ * read and write cursors. It currently only implements
+ * functionality required by the only user in GRUB (append byte[s],
+ * peeking data at a specified position and updating the read cursor.
+ * Some things that this doesn't do yet are:
+ * - Reading a portion of the buffer by copying data from the current
+ * read position in to a caller supplied destination buffer and then
+ * automatically updating the read cursor.
+ * - Dropping the read part at the start of the buffer when an append
+ * requires more space.
+ */
+typedef struct grub_buffer *grub_buffer_t;
+
+/* Allocate a new buffer with the specified initial size. */
+extern grub_buffer_t grub_buffer_new (grub_size_t sz);
+
+/* Free the buffer and its resources. */
+extern void grub_buffer_free (grub_buffer_t buf);
+
+/* Return the number of unread bytes in this buffer. */
+static inline grub_size_t
+grub_buffer_get_unread_bytes (grub_buffer_t buf)
+{
+ return buf->used - buf->pos;
+}
+
+/*
+ * Ensure that the buffer size is at least the requested
+ * number of bytes.
+ */
+extern grub_err_t grub_buffer_ensure_space (grub_buffer_t buf, grub_size_t req);
+
+/*
+ * Append the specified number of bytes from the supplied
+ * data to the buffer.
+ */
+static inline grub_err_t
+grub_buffer_append_data (grub_buffer_t buf, const void *data, grub_size_t len)
+{
+ grub_size_t req;
+
+ if (grub_add (buf->used, len, &req))
+ return grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
+
+ if (grub_buffer_ensure_space (buf, req) != GRUB_ERR_NONE)
+ return grub_errno;
+
+ grub_memcpy (&buf->data[buf->used], data, len);
+ buf->used = req;
+
+ return GRUB_ERR_NONE;
+}
+
+/* Append the supplied character to the buffer. */
+static inline grub_err_t
+grub_buffer_append_char (grub_buffer_t buf, char c)
+{
+ return grub_buffer_append_data (buf, &c, 1);
+}
+
+/*
+ * Forget and return the underlying data buffer. The caller
+ * becomes the owner of this buffer, and must free it when it
+ * is no longer required.
+ */
+extern void *grub_buffer_take_data (grub_buffer_t buf);
+
+/* Reset this buffer. Note that this does not deallocate any resources. */
+void grub_buffer_reset (grub_buffer_t buf);
+
+/*
+ * Return a pointer to the underlying data buffer at the specified
+ * offset from the current read position. Note that this pointer may
+ * become invalid if the buffer is mutated further.
+ */
+static inline void *
+grub_buffer_peek_data_at (grub_buffer_t buf, grub_size_t off)
+{
+ if (grub_add (buf->pos, off, &off))
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected."));
+ return NULL;
+ }
+
+ if (off >= buf->used)
+ {
+ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("peek out of range"));
+ return NULL;
+ }
+
+ return &buf->data[off];
+}
+
+/*
+ * Return a pointer to the underlying data buffer at the current
+ * read position. Note that this pointer may become invalid if the
+ * buffer is mutated further.
+ */
+static inline void *
+grub_buffer_peek_data (grub_buffer_t buf)
+{
+ return grub_buffer_peek_data_at (buf, 0);
+}
+
+/* Advance the read position by the specified number of bytes. */
+extern grub_err_t grub_buffer_advance_read_pos (grub_buffer_t buf, grub_size_t n);
+
+#endif /* GRUB_BUFFER_H */
--
2.25.1

View File

@@ -0,0 +1,58 @@
From 2a330dba93ff11bc00eda76e9419bc52b0c7ead6 Mon Sep 17 00:00:00 2001
From: Daniel Axtens <dja@axtens.net>
Date: Fri, 22 Jan 2021 16:07:29 +1100
Subject: lib/arg: Block repeated short options that require an argument
Fuzzing found the following crash:
search -hhhhhhhhhhhhhf
We didn't allocate enough option space for 13 hints because the
allocation code counts the number of discrete arguments (i.e. argc).
However, the shortopt parsing code will happily keep processing
a combination of short options without checking if those short
options require an argument. This means you can easily end writing
past the allocated option space.
This fixes a OOB write which can cause heap corruption.
Fixes: CVE-2021-20225
Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=2a330dba93ff11bc00eda76e9419bc52b0c7ead6]
CVE: CVE-2021-20225
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
---
grub-core/lib/arg.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/grub-core/lib/arg.c b/grub-core/lib/arg.c
index 3288609..537c5e9 100644
--- a/grub-core/lib/arg.c
+++ b/grub-core/lib/arg.c
@@ -299,6 +299,19 @@ grub_arg_parse (grub_extcmd_t cmd, int argc, char **argv,
it can have an argument value. */
if (*curshort)
{
+ /*
+ * Only permit further short opts if this one doesn't
+ * require a value.
+ */
+ if (opt->type != ARG_TYPE_NONE &&
+ !(opt->flags & GRUB_ARG_OPTION_OPTIONAL))
+ {
+ grub_error (GRUB_ERR_BAD_ARGUMENT,
+ N_("missing mandatory option for `%s'"),
+ opt->longarg);
+ goto fail;
+ }
+
if (parse_option (cmd, opt, 0, usr) || grub_errno)
goto fail;
}
--
2.25.1

View File

@@ -0,0 +1,50 @@
From 2f533a89a8dfcacbf2c9dbc77d910f111f24bf33 Mon Sep 17 00:00:00 2001
From: Daniel Axtens <dja@axtens.net>
Date: Fri, 22 Jan 2021 17:10:48 +1100
Subject: commands/menuentry: Fix quoting in setparams_prefix()
Commit 9acdcbf32542 (use single quotes in menuentry setparams command)
says that expressing a quoted single quote will require 3 characters. It
actually requires (and always did require!) 4 characters:
str: a'b => a'\''b
len: 3 => 6 (2 for the letters + 4 for the quote)
This leads to not allocating enough memory and thus out of bounds writes
that have been observed to cause heap corruption.
Allocate 4 bytes for each single quote.
Commit 22e7dbb2bb81 (Fix quoting in legacy parser.) does the same
quoting, but it adds 3 as extra overhead on top of the single byte that
the quote already needs. So it's correct.
Fixes: 9acdcbf32542 (use single quotes in menuentry setparams command)
Fixes: CVE-2021-20233
Reported-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?h=grub-2.06&id=2f533a89a8dfcacbf2c9dbc77d910f111f24bf33]
CVE: CVE-2021-20233
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
---
grub-core/commands/menuentry.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/commands/menuentry.c b/grub-core/commands/menuentry.c
index 9164df7..720e6d8 100644
--- a/grub-core/commands/menuentry.c
+++ b/grub-core/commands/menuentry.c
@@ -230,7 +230,7 @@ setparams_prefix (int argc, char **args)
len += 3; /* 3 = 1 space + 2 quotes */
p = args[i];
while (*p)
- len += (*p++ == '\'' ? 3 : 1);
+ len += (*p++ == '\'' ? 4 : 1);
}
result = grub_malloc (len + 2);
--
2.25.1

View File

@@ -0,0 +1,97 @@
From 43651027d24e62a7a463254165e1e46e42aecdea Mon Sep 17 00:00:00 2001
From: Maxim Suhanov <dfirblog@gmail.com>
Date: Mon, 28 Aug 2023 16:31:57 +0300
Subject: [PATCH] fs/ntfs: Fix an OOB write when parsing the $ATTRIBUTE_LIST
attribute for the $MFT file
When parsing an extremely fragmented $MFT file, i.e., the file described
using the $ATTRIBUTE_LIST attribute, current NTFS code will reuse a buffer
containing bytes read from the underlying drive to store sector numbers,
which are consumed later to read data from these sectors into another buffer.
These sectors numbers, two 32-bit integers, are always stored at predefined
offsets, 0x10 and 0x14, relative to first byte of the selected entry within
the $ATTRIBUTE_LIST attribute. Usually, this won't cause any problem.
However, when parsing a specially-crafted file system image, this may cause
the NTFS code to write these integers beyond the buffer boundary, likely
causing the GRUB memory allocator to misbehave or fail. These integers contain
values which are controlled by on-disk structures of the NTFS file system.
Such modification and resulting misbehavior may touch a memory range not
assigned to the GRUB and owned by firmware or another EFI application/driver.
This fix introduces checks to ensure that these sector numbers are never
written beyond the boundary.
Fixes: CVE-2023-4692
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=43651027d24e62a7a463254165e1e46e42aecdea]
CVE: CVE-2023-4692
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
---
grub-core/fs/ntfs.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
index 2f34f76..c8d3683 100644
--- a/grub-core/fs/ntfs.c
+++ b/grub-core/fs/ntfs.c
@@ -184,7 +184,7 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
}
if (at->attr_end)
{
- grub_uint8_t *pa;
+ grub_uint8_t *pa, *pa_end;
at->emft_buf = grub_malloc (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
if (at->emft_buf == NULL)
@@ -209,11 +209,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
}
at->attr_nxt = at->edat_buf;
at->attr_end = at->edat_buf + u32at (pa, 0x30);
+ pa_end = at->edat_buf + n;
}
else
{
at->attr_nxt = at->attr_end + u16at (pa, 0x14);
at->attr_end = at->attr_end + u32at (pa, 4);
+ pa_end = at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR);
}
at->flags |= GRUB_NTFS_AF_ALST;
while (at->attr_nxt < at->attr_end)
@@ -230,6 +232,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
at->flags |= GRUB_NTFS_AF_GPOS;
at->attr_cur = at->attr_nxt;
pa = at->attr_cur;
+
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
+ return NULL;
+ }
+
grub_set_unaligned32 ((char *) pa + 0x10,
grub_cpu_to_le32 (at->mft->data->mft_start));
grub_set_unaligned32 ((char *) pa + 0x14,
@@ -240,6 +249,13 @@ find_attr (struct grub_ntfs_attr *at, grub_uint8_t attr)
{
if (*pa != attr)
break;
+
+ if ((pa >= pa_end) || (pa_end - pa < 0x18))
+ {
+ grub_error (GRUB_ERR_BAD_FS, "can\'t parse attribute list");
+ return NULL;
+ }
+
if (read_attr
(at, pa + 0x10,
u32at (pa, 0x10) * (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR),
--
2.25.1

View File

@@ -0,0 +1,62 @@
From 0ed2458cc4eff6d9a9199527e2a0b6d445802f94 Mon Sep 17 00:00:00 2001
From: Maxim Suhanov <dfirblog@gmail.com>
Date: Mon, 28 Aug 2023 16:32:33 +0300
Subject: [PATCH] fs/ntfs: Fix an OOB read when reading data from the resident
$DATA attribute
When reading a file containing resident data, i.e., the file data is stored in
the $DATA attribute within the NTFS file record, not in external clusters,
there are no checks that this resident data actually fits the corresponding
file record segment.
When parsing a specially-crafted file system image, the current NTFS code will
read the file data from an arbitrary, attacker-chosen memory offset and of
arbitrary, attacker-chosen length.
This allows an attacker to display arbitrary chunks of memory, which could
contain sensitive information like password hashes or even plain-text,
obfuscated passwords from BS EFI variables.
This fix implements a check to ensure that resident data is read from the
corresponding file record segment only.
Fixes: CVE-2023-4693
Reported-by: Maxim Suhanov <dfirblog@gmail.com>
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Upstream-Status: Backport [https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=0ed2458cc4eff6d9a9199527e2a0b6d445802f94]
CVE: CVE-2023-4693
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
---
grub-core/fs/ntfs.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
index c8d3683..4d1fe42 100644
--- a/grub-core/fs/ntfs.c
+++ b/grub-core/fs/ntfs.c
@@ -401,7 +401,18 @@ read_data (struct grub_ntfs_attr *at, grub_uint8_t *pa, grub_uint8_t *dest,
{
if (ofs + len > u32at (pa, 0x10))
return grub_error (GRUB_ERR_BAD_FS, "read out of range");
- grub_memcpy (dest, pa + u32at (pa, 0x14) + ofs, len);
+
+ if (u32at (pa, 0x10) > (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute too large");
+
+ if (pa >= at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR))
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
+
+ if (u16at (pa, 0x14) + u32at (pa, 0x10) >
+ (grub_addr_t) at->mft->buf + (at->mft->data->mft_size << GRUB_NTFS_BLK_SHR) - (grub_addr_t) pa)
+ return grub_error (GRUB_ERR_BAD_FS, "resident attribute out of range");
+
+ grub_memcpy (dest, pa + u16at (pa, 0x14) + ofs, len);
return 0;
}
--
2.25.1

View File

@@ -11,7 +11,7 @@ missing sorting of the list used to generate it. Add such a sort.
Also ensure the generated unidata.c file is deterministic by sorting the
keys of the dict.
Upstream-Status: Pending
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/grub-devel/2023-06/index.html]
Richard Purdie <richard.purdie@linuxfoundation.org>
Index: grub-2.04/grub-core/genmoddep.awk

View File

@@ -106,6 +106,11 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
file://font-Fix-size-overflow-in-grub_font_get_glyph_intern.patch \
file://CVE-2022-2601.patch \
file://CVE-2022-3775.patch \
file://CVE-2020-27749.patch \
file://CVE-2021-20225.patch \
file://CVE-2021-20233.patch \
file://CVE-2023-4692.patch \
file://CVE-2023-4693.patch \
"
SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934"
SRC_URI[sha256sum] = "f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e5031658ba6ea"
@@ -125,6 +130,8 @@ GRUBPLATFORM ??= "pc"
inherit autotools gettext texinfo pkgconfig
CFLAGS_remove = "-O2"
EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
--disable-grub-mkfont \
--program-prefix="" \

View File

@@ -19,9 +19,12 @@ PACKAGECONFIG[manpages] = "--enable-doc, --disable-doc, libxslt-native xmlto-nat
RDEPENDS_${PN} = "grep bash"
EXTRA_OECONF = "--libdir=${nonarch_libdir}"
do_configure_prepend () {
( cd ${S}; autoreconf -f -i -s )
}
FILES_${PN} += "${libdir}/${BPN}/*"
FILES_${PN} += "${nonarch_libdir}/${BPN}/*"
FILES_${PN}-dbg += "${datadir}/doc/pm-utils/README.debugging"
FILES_${PN}-dev += "${nonarch_libdir}/pkgconfig/pm-utils.pc"

View File

@@ -22,6 +22,15 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \
file://fix-CVE-2017-6519.patch \
file://CVE-2021-3468.patch \
file://CVE-2023-1981.patch \
file://CVE-2023-38469-1.patch \
file://CVE-2023-38469-2.patch \
file://CVE-2023-38470-1.patch \
file://CVE-2023-38470-2.patch \
file://CVE-2023-38471-1.patch \
file://CVE-2023-38471-2.patch \
file://CVE-2023-38472.patch \
file://CVE-2023-38473.patch \
"
UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"

View File

@@ -0,0 +1,60 @@
Backport of:
From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Thu, 17 Nov 2022 01:51:53 +0100
Subject: [PATCH] Emit error if requested service is not found
It currently just crashes instead of replying with error. Check return
value and emit error instead of passing NULL pointer to reply.
Fixes #375
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-1981.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f]
CVE: CVE-2023-1981
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
--- a/avahi-daemon/dbus-protocol.c
+++ b/avahi-daemon/dbus-protocol.c
@@ -391,10 +391,14 @@ static DBusHandlerResult msg_server_impl
}
t = avahi_alternative_host_name(n);
- avahi_dbus_respond_string(c, m, t);
- avahi_free(t);
-
- return DBUS_HANDLER_RESULT_HANDLED;
+ if (t) {
+ avahi_dbus_respond_string(c, m, t);
+ avahi_free(t);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ } else {
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found");
+ }
} else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "GetAlternativeServiceName")) {
char *n, *t;
@@ -405,10 +409,14 @@ static DBusHandlerResult msg_server_impl
}
t = avahi_alternative_service_name(n);
- avahi_dbus_respond_string(c, m, t);
- avahi_free(t);
-
- return DBUS_HANDLER_RESULT_HANDLED;
+ if (t) {
+ avahi_dbus_respond_string(c, m, t);
+ avahi_free(t);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ } else {
+ return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found");
+ }
} else if (dbus_message_is_method_call(m, AVAHI_DBUS_INTERFACE_SERVER, "EntryGroupNew")) {
Client *client;

View File

@@ -0,0 +1,48 @@
From a337a1ba7d15853fb56deef1f464529af6e3a1cf Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin <evvers@ya.ru>
Date: Mon, 23 Oct 2023 20:29:31 +0000
Subject: [PATCH] core: reject overly long TXT resource records
Closes https://github.com/lathiat/avahi/issues/455
CVE-2023-38469
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-1.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/a337a1ba7d15853fb56deef1f464529af6e3a1cf]
CVE: CVE-2023-38469
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-core/rr.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Index: avahi-0.7/avahi-core/rr.c
===================================================================
--- avahi-0.7.orig/avahi-core/rr.c
+++ avahi-0.7/avahi-core/rr.c
@@ -32,6 +32,7 @@
#include <avahi-common/malloc.h>
#include <avahi-common/defs.h>
+#include "dns.h"
#include "rr.h"
#include "log.h"
#include "util.h"
@@ -688,11 +689,17 @@ int avahi_record_is_valid(AvahiRecord *r
case AVAHI_DNS_TYPE_TXT: {
AvahiStringList *strlst;
+ size_t used = 0;
- for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)
+ for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) {
if (strlst->size > 255 || strlst->size <= 0)
return 0;
+ used += 1+strlst->size;
+ if (used > AVAHI_DNS_RDATA_MAX)
+ return 0;
+ }
+
return 1;
}
}

View File

@@ -0,0 +1,65 @@
From c6cab87df290448a63323c8ca759baa516166237 Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin <evvers@ya.ru>
Date: Wed, 25 Oct 2023 18:15:42 +0000
Subject: [PATCH] tests: pass overly long TXT resource records
to make sure they don't crash avahi any more.
It reproduces https://github.com/lathiat/avahi/issues/455
Canonical notes:
nickgalanis> removed first hunk since there is no .github dir in this release
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-2.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/c6cab87df290448a63323c8ca759baa516166237]
CVE: CVE-2023-38469
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-client/client-test.c | 14 ++++++++++++++
1 files changed, 14 insertions(+)
Index: avahi-0.7/avahi-client/client-test.c
===================================================================
--- avahi-0.7.orig/avahi-client/client-test.c
+++ avahi-0.7/avahi-client/client-test.c
@@ -22,6 +22,7 @@
#endif
#include <stdio.h>
+#include <string.h>
#include <assert.h>
#include <avahi-client/client.h>
@@ -33,6 +34,8 @@
#include <avahi-common/malloc.h>
#include <avahi-common/timeval.h>
+#include <avahi-core/dns.h>
+
static const AvahiPoll *poll_api = NULL;
static AvahiSimplePoll *simple_poll = NULL;
@@ -222,6 +225,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
uint32_t cookie;
struct timeval tv;
AvahiAddress a;
+ uint8_t rdata[AVAHI_DNS_RDATA_MAX+1];
+ AvahiStringList *txt = NULL;
+ int r;
simple_poll = avahi_simple_poll_new();
poll_api = avahi_simple_poll_get(simple_poll);
@@ -258,6 +264,14 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL)));
printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6));
+ memset(rdata, 1, sizeof(rdata));
+ r = avahi_string_list_parse(rdata, sizeof(rdata), &txt);
+ assert(r >= 0);
+ assert(avahi_string_list_serialize(txt, NULL, 0) == sizeof(rdata));
+ error = avahi_entry_group_add_service_strlst(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", "_qotd._tcp", NULL, NULL, 123, txt);
+ assert(error == AVAHI_ERR_INVALID_RECORD);
+ avahi_string_list_free(txt);
+
avahi_entry_group_commit (group);
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");

View File

@@ -0,0 +1,57 @@
From 94cb6489114636940ac683515417990b55b5d66c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Tue, 11 Apr 2023 15:29:59 +0200
Subject: [PATCH] Ensure each label is at least one byte long
The only allowed exception is single dot, where it should return empty
string.
Fixes #454.
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38470-1.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/94cb6489114636940ac683515417990b55b5d66c]
CVE: CVE-2023-38470
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-common/domain-test.c | 14 ++++++++++++++
avahi-common/domain.c | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
Index: avahi-0.7/avahi-common/domain-test.c
===================================================================
--- avahi-0.7.orig/avahi-common/domain-test.c
+++ avahi-0.7/avahi-common/domain-test.c
@@ -45,6 +45,20 @@ int main(AVAHI_GCC_UNUSED int argc, AVAH
printf("%s\n", s = avahi_normalize_name_strdup("fo\\\\o\\..f oo."));
avahi_free(s);
+ printf("%s\n", s = avahi_normalize_name_strdup("."));
+ avahi_free(s);
+
+ s = avahi_normalize_name_strdup(",.=.}.=.?-.}.=.?.?.}.}.?.?.?.z.?.?.}.}."
+ "}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.}.}.}"
+ ".?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.?.zM.?`"
+ "?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}??.}.}.?.?."
+ "?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.?`?.}.}.}."
+ "??.?.zM.?`?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}?"
+ "?.}.}.?.?.?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM."
+ "?`?.}.}.}.?.?.?.r.=.=.?.?`.?.?}.}.}.?.?.?.r.=.?.}.=.?.?."
+ "}.?.?.?.}.=.?.?.}");
+ assert(s == NULL);
+
printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
printf("%i\n", avahi_domain_equal("A", "a"));
Index: avahi-0.7/avahi-common/domain.c
===================================================================
--- avahi-0.7.orig/avahi-common/domain.c
+++ avahi-0.7/avahi-common/domain.c
@@ -201,7 +201,7 @@ char *avahi_normalize_name(const char *s
}
if (!empty) {
- if (size < 1)
+ if (size < 2)
return NULL;
*(r++) = '.';

View File

@@ -0,0 +1,53 @@
From 20dec84b2480821704258bc908e7b2bd2e883b24 Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin <evvers@ya.ru>
Date: Tue, 19 Sep 2023 03:21:25 +0000
Subject: [PATCH] [common] bail out when escaped labels can't fit into ret
Fixes:
```
==93410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9e76f14c16 at pc 0x00000047208d bp 0x7ffee90a6a00 sp 0x7ffee90a61c8
READ of size 1110 at 0x7f9e76f14c16 thread T0
#0 0x47208c in __interceptor_strlen (out/fuzz-domain+0x47208c) (BuildId: 731b20c1eef22c2104e75a6496a399b10cfc7cba)
#1 0x534eb0 in avahi_strdup avahi/avahi-common/malloc.c:167:12
#2 0x53862c in avahi_normalize_name_strdup avahi/avahi-common/domain.c:226:12
```
and
```
fuzz-domain: fuzz/fuzz-domain.c:38: int LLVMFuzzerTestOneInput(const uint8_t *, size_t): Assertion `avahi_domain_equal(s, t)' failed.
==101571== ERROR: libFuzzer: deadly signal
#0 0x501175 in __sanitizer_print_stack_trace (/home/vagrant/avahi/out/fuzz-domain+0x501175) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
#1 0x45ad2c in fuzzer::PrintStackTrace() (/home/vagrant/avahi/out/fuzz-domain+0x45ad2c) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
#2 0x43fc07 in fuzzer::Fuzzer::CrashCallback() (/home/vagrant/avahi/out/fuzz-domain+0x43fc07) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8)
#3 0x7f1581d7ebaf (/lib64/libc.so.6+0x3dbaf) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
#4 0x7f1581dcf883 in __pthread_kill_implementation (/lib64/libc.so.6+0x8e883) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
#5 0x7f1581d7eafd in gsignal (/lib64/libc.so.6+0x3dafd) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
#6 0x7f1581d6787e in abort (/lib64/libc.so.6+0x2687e) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
#7 0x7f1581d6779a in __assert_fail_base.cold (/lib64/libc.so.6+0x2679a) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
#8 0x7f1581d77186 in __assert_fail (/lib64/libc.so.6+0x36186) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25)
#9 0x5344a4 in LLVMFuzzerTestOneInput /home/vagrant/avahi/fuzz/fuzz-domain.c:38:9
```
It's a follow-up to 94cb6489114636940ac683515417990b55b5d66c
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/20dec84b2480821704258bc908e7b2bd2e883b24]
CVE: CVE-2023-38470 #Follow-up patch
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-common/domain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: avahi-0.7/avahi-common/domain.c
===================================================================
--- avahi-0.7.orig/avahi-common/domain.c
+++ avahi-0.7/avahi-common/domain.c
@@ -210,7 +210,8 @@ char *avahi_normalize_name(const char *s
} else
empty = 0;
- avahi_escape_label(label, strlen(label), &r, &size);
+ if (!(avahi_escape_label(label, strlen(label), &r, &size)))
+ return NULL;
}
return ret_s;

View File

@@ -0,0 +1,73 @@
From 894f085f402e023a98cbb6f5a3d117bd88d93b09 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 23 Oct 2023 13:38:35 +0200
Subject: [PATCH] core: extract host name using avahi_unescape_label()
Previously we could create invalid escape sequence when we split the
string on dot. For example, from valid host name "foo\\.bar" we have
created invalid name "foo\\" and tried to set that as the host name
which crashed the daemon.
Fixes #453
CVE-2023-38471
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-1.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/894f085f402e023a98cbb6f5a3d117bd88d93b09]
CVE: CVE-2023-38471
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-core/server.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
Index: avahi-0.7/avahi-core/server.c
===================================================================
--- avahi-0.7.orig/avahi-core/server.c
+++ avahi-0.7/avahi-core/server.c
@@ -1253,7 +1253,11 @@ static void update_fqdn(AvahiServer *s)
}
int avahi_server_set_host_name(AvahiServer *s, const char *host_name) {
- char *hn = NULL;
+ char label_escaped[AVAHI_LABEL_MAX*4+1];
+ char label[AVAHI_LABEL_MAX];
+ char *hn = NULL, *h;
+ size_t len;
+
assert(s);
AVAHI_CHECK_VALIDITY(s, !host_name || avahi_is_valid_host_name(host_name), AVAHI_ERR_INVALID_HOST_NAME);
@@ -1263,17 +1267,28 @@ int avahi_server_set_host_name(AvahiServ
else
hn = avahi_normalize_name_strdup(host_name);
- hn[strcspn(hn, ".")] = 0;
+ h = hn;
+ if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
+ avahi_free(h);
+ return AVAHI_ERR_INVALID_HOST_NAME;
+ }
+
+ avahi_free(h);
- if (avahi_domain_equal(s->host_name, hn) && s->state != AVAHI_SERVER_COLLISION) {
- avahi_free(hn);
+ h = label_escaped;
+ len = sizeof(label_escaped);
+ if (!avahi_escape_label(label, strlen(label), &h, &len))
+ return AVAHI_ERR_INVALID_HOST_NAME;
+
+ if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
- }
withdraw_host_rrs(s);
avahi_free(s->host_name);
- s->host_name = hn;
+ s->host_name = avahi_strdup(label_escaped);
+ if (!s->host_name)
+ return AVAHI_ERR_NO_MEMORY;
update_fqdn(s);

View File

@@ -0,0 +1,52 @@
From b675f70739f404342f7f78635d6e2dcd85a13460 Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin <evvers@ya.ru>
Date: Tue, 24 Oct 2023 22:04:51 +0000
Subject: [PATCH] core: return errors from avahi_server_set_host_name properly
It's a follow-up to 894f085f402e023a98cbb6f5a3d117bd88d93b09
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/b675f70739f404342f7f78635d6e2dcd85a13460]
CVE: CVE-2023-38471 #Follow-up Patch
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-core/server.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Index: avahi-0.7/avahi-core/server.c
===================================================================
--- avahi-0.7.orig/avahi-core/server.c
+++ avahi-0.7/avahi-core/server.c
@@ -1267,10 +1267,13 @@ int avahi_server_set_host_name(AvahiServ
else
hn = avahi_normalize_name_strdup(host_name);
+ if (!hn)
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
+
h = hn;
if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) {
avahi_free(h);
- return AVAHI_ERR_INVALID_HOST_NAME;
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
}
avahi_free(h);
@@ -1278,7 +1281,7 @@ int avahi_server_set_host_name(AvahiServ
h = label_escaped;
len = sizeof(label_escaped);
if (!avahi_escape_label(label, strlen(label), &h, &len))
- return AVAHI_ERR_INVALID_HOST_NAME;
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION)
return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE);
@@ -1288,7 +1291,7 @@ int avahi_server_set_host_name(AvahiServ
avahi_free(s->host_name);
s->host_name = avahi_strdup(label_escaped);
if (!s->host_name)
- return AVAHI_ERR_NO_MEMORY;
+ return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY);
update_fqdn(s);

View File

@@ -0,0 +1,45 @@
From b024ae5749f4aeba03478e6391687c3c9c8dee40 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Thu, 19 Oct 2023 17:36:44 +0200
Subject: [PATCH] core: make sure there is rdata to process before parsing it
Fixes #452
CVE-2023-38472
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38472.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40]
CVE: CVE-2023-38472
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-client/client-test.c | 3 +++
avahi-daemon/dbus-entry-group.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
Index: avahi-0.7/avahi-client/client-test.c
===================================================================
--- avahi-0.7.orig/avahi-client/client-test.c
+++ avahi-0.7/avahi-client/client-test.c
@@ -272,6 +272,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA
assert(error == AVAHI_ERR_INVALID_RECORD);
avahi_string_list_free(txt);
+ error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0);
+ assert(error != AVAHI_OK);
+
avahi_entry_group_commit (group);
domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
Index: avahi-0.7/avahi-daemon/dbus-entry-group.c
===================================================================
--- avahi-0.7.orig/avahi-daemon/dbus-entry-group.c
+++ avahi-0.7/avahi-daemon/dbus-entry-group.c
@@ -340,7 +340,7 @@ DBusHandlerResult avahi_dbus_msg_entry_g
if (!(r = avahi_record_new_full (name, clazz, type, ttl)))
return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL);
- if (avahi_rdata_parse (r, rdata, size) < 0) {
+ if (!rdata || avahi_rdata_parse (r, rdata, size) < 0) {
avahi_record_unref (r);
return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL);
}

View File

@@ -0,0 +1,109 @@
From b448c9f771bada14ae8de175695a9729f8646797 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Wed, 11 Oct 2023 17:45:44 +0200
Subject: [PATCH] common: derive alternative host name from its unescaped
version
Normalization of input makes sure we don't have to deal with special
cases like unescaped dot at the end of label.
Fixes #451 #487
CVE-2023-38473
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38473.patch?h=ubuntu/focal-security
Upstream commit https://github.com/lathiat/avahi/commit/b448c9f771bada14ae8de175695a9729f8646797]
CVE: CVE-2023-38473
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
avahi-common/alternative-test.c | 3 +++
avahi-common/alternative.c | 27 +++++++++++++++++++--------
2 files changed, 22 insertions(+), 8 deletions(-)
Index: avahi-0.7/avahi-common/alternative-test.c
===================================================================
--- avahi-0.7.orig/avahi-common/alternative-test.c
+++ avahi-0.7/avahi-common/alternative-test.c
@@ -31,6 +31,9 @@ int main(AVAHI_GCC_UNUSED int argc, AVAH
const char* const test_strings[] = {
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXüüüüüüü",
+ ").",
+ "\\.",
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\",
"gurke",
"-",
" #",
Index: avahi-0.7/avahi-common/alternative.c
===================================================================
--- avahi-0.7.orig/avahi-common/alternative.c
+++ avahi-0.7/avahi-common/alternative.c
@@ -49,15 +49,20 @@ static void drop_incomplete_utf8(char *c
}
char *avahi_alternative_host_name(const char *s) {
+ char label[AVAHI_LABEL_MAX], alternative[AVAHI_LABEL_MAX*4+1];
+ char *alt, *r, *ret;
const char *e;
- char *r;
+ size_t len;
assert(s);
if (!avahi_is_valid_host_name(s))
return NULL;
- if ((e = strrchr(s, '-'))) {
+ if (!avahi_unescape_label(&s, label, sizeof(label)))
+ return NULL;
+
+ if ((e = strrchr(label, '-'))) {
const char *p;
e++;
@@ -74,19 +79,18 @@ char *avahi_alternative_host_name(const
if (e) {
char *c, *m;
- size_t l;
int n;
n = atoi(e)+1;
if (!(m = avahi_strdup_printf("%i", n)))
return NULL;
- l = e-s-1;
+ len = e-label-1;
- if (l >= AVAHI_LABEL_MAX-1-strlen(m)-1)
- l = AVAHI_LABEL_MAX-1-strlen(m)-1;
+ if (len >= AVAHI_LABEL_MAX-1-strlen(m)-1)
+ len = AVAHI_LABEL_MAX-1-strlen(m)-1;
- if (!(c = avahi_strndup(s, l))) {
+ if (!(c = avahi_strndup(label, len))) {
avahi_free(m);
return NULL;
}
@@ -100,7 +104,7 @@ char *avahi_alternative_host_name(const
} else {
char *c;
- if (!(c = avahi_strndup(s, AVAHI_LABEL_MAX-1-2)))
+ if (!(c = avahi_strndup(label, AVAHI_LABEL_MAX-1-2)))
return NULL;
drop_incomplete_utf8(c);
@@ -109,6 +113,13 @@ char *avahi_alternative_host_name(const
avahi_free(c);
}
+ alt = alternative;
+ len = sizeof(alternative);
+ ret = avahi_escape_label(r, strlen(r), &alt, &len);
+
+ avahi_free(r);
+ r = avahi_strdup(ret);
+
assert(avahi_is_valid_host_name(r));
return r;

View File

@@ -0,0 +1,166 @@
Upstream-Status: Backport [import from debian security.debian.org/debian-security/pool/updates/main/b/bind9/bind9_9.11.5.P4+dfsg-5.1+deb10u9.debian.tar.xz
Upstream patch https://downloads.isc.org/isc/bind9/9.16.42/patches/0001-CVE-2023-2828.patch]
Upstream Commit: https://github.com/isc-projects/bind9/commit/da0eafcdee52147e72d407cc3b9f179378ee1d3a
CVE: CVE-2023-2828
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
lib/dns/rbtdb.c | 106 +++++++++++++++++++++++++++++++++-----------------------
1 file changed, 63 insertions(+), 43 deletions(-)
diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c
index b1b928c..3165e26 100644
--- a/lib/dns/rbtdb.c
+++ b/lib/dns/rbtdb.c
@@ -792,7 +792,7 @@ static void update_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header,
static void expire_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header,
bool tree_locked, expire_t reason);
static void overmem_purge(dns_rbtdb_t *rbtdb, unsigned int locknum_start,
- isc_stdtime_t now, bool tree_locked);
+ size_t purgesize, bool tree_locked);
static isc_result_t resign_insert(dns_rbtdb_t *rbtdb, int idx,
rdatasetheader_t *newheader);
static void resign_delete(dns_rbtdb_t *rbtdb, rbtdb_version_t *version,
@@ -6784,6 +6784,16 @@ addclosest(dns_rbtdb_t *rbtdb, rdatasetheader_t *newheader,
static dns_dbmethods_t zone_methods;
+static size_t
+rdataset_size(rdatasetheader_t *header) {
+ if (!NONEXISTENT(header)) {
+ return (dns_rdataslab_size((unsigned char *)header,
+ sizeof(*header)));
+ }
+
+ return (sizeof(*header));
+}
+
static isc_result_t
addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
isc_stdtime_t now, dns_rdataset_t *rdataset, unsigned int options,
@@ -6932,7 +6942,8 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
}
if (cache_is_overmem)
- overmem_purge(rbtdb, rbtnode->locknum, now, tree_locked);
+ overmem_purge(rbtdb, rbtnode->locknum, rdataset_size(newheader),
+ tree_locked);
NODE_LOCK(&rbtdb->node_locks[rbtnode->locknum].lock,
isc_rwlocktype_write);
@@ -6947,9 +6958,14 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
cleanup_dead_nodes(rbtdb, rbtnode->locknum);
header = isc_heap_element(rbtdb->heaps[rbtnode->locknum], 1);
- if (header && header->rdh_ttl < now - RBTDB_VIRTUAL)
- expire_header(rbtdb, header, tree_locked,
- expire_ttl);
+ if (header != NULL) {
+ dns_ttl_t rdh_ttl = header->rdh_ttl;
+
+ if (rdh_ttl < now - RBTDB_VIRTUAL) {
+ expire_header(rbtdb, header, tree_locked,
+ expire_ttl);
+ }
+ }
/*
* If we've been holding a write lock on the tree just for
@@ -10388,54 +10404,58 @@ update_header(dns_rbtdb_t *rbtdb, rdatasetheader_t *header,
ISC_LIST_PREPEND(rbtdb->rdatasets[header->node->locknum], header, link);
}
+static size_t
+expire_lru_headers(dns_rbtdb_t *rbtdb, unsigned int locknum, size_t purgesize,
+ bool tree_locked) {
+ rdatasetheader_t *header, *header_prev;
+ size_t purged = 0;
+
+ for (header = ISC_LIST_TAIL(rbtdb->rdatasets[locknum]);
+ header != NULL && purged <= purgesize; header = header_prev)
+ {
+ header_prev = ISC_LIST_PREV(header, link);
+ /*
+ * Unlink the entry at this point to avoid checking it
+ * again even if it's currently used someone else and
+ * cannot be purged at this moment. This entry won't be
+ * referenced any more (so unlinking is safe) since the
+ * TTL was reset to 0.
+ */
+ ISC_LIST_UNLINK(rbtdb->rdatasets[locknum], header, link);
+ size_t header_size = rdataset_size(header);
+ expire_header(rbtdb, header, tree_locked, expire_lru);
+ purged += header_size;
+ }
+
+ return (purged);
+}
+
/*%
- * Purge some expired and/or stale (i.e. unused for some period) cache entries
- * under an overmem condition. To recover from this condition quickly, up to
- * 2 entries will be purged. This process is triggered while adding a new
- * entry, and we specifically avoid purging entries in the same LRU bucket as
- * the one to which the new entry will belong. Otherwise, we might purge
- * entries of the same name of different RR types while adding RRsets from a
- * single response (consider the case where we're adding A and AAAA glue records
- * of the same NS name).
- */
+ * Purge some stale (i.e. unused for some period - LRU based cleaning) cache
+ * entries under the overmem condition. To recover from this condition quickly,
+ * we cleanup entries up to the size of newly added rdata (passed as purgesize).
+ *
+ * This process is triggered while adding a new entry, and we specifically avoid
+ * purging entries in the same LRU bucket as the one to which the new entry will
+ * belong. Otherwise, we might purge entries of the same name of different RR
+ * types while adding RRsets from a single response (consider the case where
+ * we're adding A and AAAA glue records of the same NS name).
+*/
static void
-overmem_purge(dns_rbtdb_t *rbtdb, unsigned int locknum_start,
- isc_stdtime_t now, bool tree_locked)
+overmem_purge(dns_rbtdb_t *rbtdb, unsigned int locknum_start, size_t purgesize,
+ bool tree_locked)
{
- rdatasetheader_t *header, *header_prev;
unsigned int locknum;
- int purgecount = 2;
+ size_t purged = 0;
for (locknum = (locknum_start + 1) % rbtdb->node_lock_count;
- locknum != locknum_start && purgecount > 0;
+ locknum != locknum_start && purged <= purgesize;
locknum = (locknum + 1) % rbtdb->node_lock_count) {
NODE_LOCK(&rbtdb->node_locks[locknum].lock,
isc_rwlocktype_write);
- header = isc_heap_element(rbtdb->heaps[locknum], 1);
- if (header && header->rdh_ttl < now - RBTDB_VIRTUAL) {
- expire_header(rbtdb, header, tree_locked,
- expire_ttl);
- purgecount--;
- }
-
- for (header = ISC_LIST_TAIL(rbtdb->rdatasets[locknum]);
- header != NULL && purgecount > 0;
- header = header_prev) {
- header_prev = ISC_LIST_PREV(header, link);
- /*
- * Unlink the entry at this point to avoid checking it
- * again even if it's currently used someone else and
- * cannot be purged at this moment. This entry won't be
- * referenced any more (so unlinking is safe) since the
- * TTL was reset to 0.
- */
- ISC_LIST_UNLINK(rbtdb->rdatasets[locknum], header,
- link);
- expire_header(rbtdb, header, tree_locked,
- expire_lru);
- purgecount--;
- }
+ purged += expire_lru_headers(rbtdb, locknum, purgesize - purged,
+ tree_locked);
NODE_UNLOCK(&rbtdb->node_locks[locknum].lock,
isc_rwlocktype_write);

View File

@@ -0,0 +1,175 @@
From c4fac5ca98efd02fbaef43601627c7a3a09f5a71 Mon Sep 17 00:00:00 2001
From: Mark Andrews <marka@isc.org>
Date: Tue, 20 Jun 2023 15:21:36 +1000
Subject: [PATCH] Limit isccc_cc_fromwire recursion depth
Named and rndc do not need a lot of recursion so the depth is
set to 10.
Taken from BIND 9.16.44 change.
Upstream-Status: Backport [https://gitlab.isc.org/isc-projects/bind9/-/commit/c4fac5ca98efd02fbaef43601627c7a3a09f5a71]
CVE: CVE-2023-3341
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
lib/isccc/cc.c | 38 +++++++++++++++++++++++---------
lib/isccc/include/isccc/result.h | 4 +++-
lib/isccc/result.c | 4 +++-
3 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/lib/isccc/cc.c b/lib/isccc/cc.c
index e012685..8eac3d6 100644
--- a/lib/isccc/cc.c
+++ b/lib/isccc/cc.c
@@ -53,6 +53,10 @@
#define MAX_TAGS 256
#define DUP_LIFETIME 900
+#ifndef ISCCC_MAXDEPTH
+#define ISCCC_MAXDEPTH \
+ 10 /* Big enough for rndc which just sends a string each way. */
+#endif
typedef isccc_sexpr_t *sexpr_ptr;
@@ -561,19 +565,25 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length,
static isc_result_t
table_fromwire(isccc_region_t *source, isccc_region_t *secret,
- uint32_t algorithm, isccc_sexpr_t **alistp);
+ uint32_t algorithm, unsigned int depth, isccc_sexpr_t **alistp);
static isc_result_t
-list_fromwire(isccc_region_t *source, isccc_sexpr_t **listp);
+list_fromwire(isccc_region_t *source, unsigned int depth,
+ isccc_sexpr_t **listp);
static isc_result_t
-value_fromwire(isccc_region_t *source, isccc_sexpr_t **valuep) {
+value_fromwire(isccc_region_t *source, unsigned int depth,
+ isccc_sexpr_t **valuep) {
unsigned int msgtype;
uint32_t len;
isccc_sexpr_t *value;
isccc_region_t active;
isc_result_t result;
+ if (depth > ISCCC_MAXDEPTH) {
+ return (ISCCC_R_MAXDEPTH);
+ }
+
if (REGION_SIZE(*source) < 1 + 4)
return (ISC_R_UNEXPECTEDEND);
GET8(msgtype, source->rstart);
@@ -591,9 +601,9 @@ value_fromwire(isccc_region_t *source, isccc_sexpr_t **valuep) {
} else
result = ISC_R_NOMEMORY;
} else if (msgtype == ISCCC_CCMSGTYPE_TABLE)
- result = table_fromwire(&active, NULL, 0, valuep);
+ result = table_fromwire(&active, NULL, 0, depth + 1, valuep);
else if (msgtype == ISCCC_CCMSGTYPE_LIST)
- result = list_fromwire(&active, valuep);
+ result = list_fromwire(&active, depth + 1, valuep);
else
result = ISCCC_R_SYNTAX;
@@ -602,7 +612,7 @@ value_fromwire(isccc_region_t *source, isccc_sexpr_t **valuep) {
static isc_result_t
table_fromwire(isccc_region_t *source, isccc_region_t *secret,
- uint32_t algorithm, isccc_sexpr_t **alistp)
+ uint32_t algorithm, unsigned int depth, isccc_sexpr_t **alistp)
{
char key[256];
uint32_t len;
@@ -613,6 +623,10 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
REQUIRE(alistp != NULL && *alistp == NULL);
+ if (depth > ISCCC_MAXDEPTH) {
+ return (ISCCC_R_MAXDEPTH);
+ }
+
checksum_rstart = NULL;
first_tag = true;
alist = isccc_alist_create();
@@ -628,7 +642,7 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
GET_MEM(key, len, source->rstart);
key[len] = '\0'; /* Ensure NUL termination. */
value = NULL;
- result = value_fromwire(source, &value);
+ result = value_fromwire(source, depth + 1, &value);
if (result != ISC_R_SUCCESS)
goto bad;
if (isccc_alist_define(alist, key, value) == NULL) {
@@ -661,14 +675,18 @@ table_fromwire(isccc_region_t *source, isccc_region_t *secret,
}
static isc_result_t
-list_fromwire(isccc_region_t *source, isccc_sexpr_t **listp) {
+list_fromwire(isccc_region_t *source, unsigned int depth, isccc_sexpr_t **listp) {
isccc_sexpr_t *list, *value;
isc_result_t result;
+ if (depth > ISCCC_MAXDEPTH) {
+ return (ISCCC_R_MAXDEPTH);
+ }
+
list = NULL;
while (!REGION_EMPTY(*source)) {
value = NULL;
- result = value_fromwire(source, &value);
+ result = value_fromwire(source, depth + 1, &value);
if (result != ISC_R_SUCCESS) {
isccc_sexpr_free(&list);
return (result);
@@ -699,7 +717,7 @@ isccc_cc_fromwire(isccc_region_t *source, isccc_sexpr_t **alistp,
if (version != 1)
return (ISCCC_R_UNKNOWNVERSION);
- return (table_fromwire(source, secret, algorithm, alistp));
+ return (table_fromwire(source, secret, algorithm, 0, alistp));
}
static isc_result_t
diff --git a/lib/isccc/include/isccc/result.h b/lib/isccc/include/isccc/result.h
index 6c79dd7..a85861c 100644
--- a/lib/isccc/include/isccc/result.h
+++ b/lib/isccc/include/isccc/result.h
@@ -47,8 +47,10 @@
#define ISCCC_R_CLOCKSKEW (ISC_RESULTCLASS_ISCCC + 4)
/*% Duplicate */
#define ISCCC_R_DUPLICATE (ISC_RESULTCLASS_ISCCC + 5)
+/*% Maximum recursion depth */
+#define ISCCC_R_MAXDEPTH (ISC_RESULTCLASS_ISCCC + 6)
-#define ISCCC_R_NRESULTS 6 /*%< Number of results */
+#define ISCCC_R_NRESULTS 7 /*%< Number of results */
ISC_LANG_BEGINDECLS
diff --git a/lib/isccc/result.c b/lib/isccc/result.c
index 8419bbb..325200b 100644
--- a/lib/isccc/result.c
+++ b/lib/isccc/result.c
@@ -40,7 +40,8 @@ static const char *text[ISCCC_R_NRESULTS] = {
"bad auth", /* 3 */
"expired", /* 4 */
"clock skew", /* 5 */
- "duplicate" /* 6 */
+ "duplicate", /* 6 */
+ "max depth", /* 7 */
};
static const char *ids[ISCCC_R_NRESULTS] = {
@@ -50,6 +51,7 @@ static const char *ids[ISCCC_R_NRESULTS] = {
"ISCCC_R_EXPIRED",
"ISCCC_R_CLOCKSKEW",
"ISCCC_R_DUPLICATE",
+ "ISCCC_R_MAXDEPTH",
};
#define ISCCC_RESULT_RESULTSET 2
--
2.25.1

View File

@@ -22,6 +22,8 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
file://CVE-2022-2795.patch \
file://CVE-2022-38177.patch \
file://CVE-2022-38178.patch \
file://CVE-2023-2828.patch \
file://CVE-2023-3341.patch \
"
SRC_URI[sha256sum] = "0d8efbe7ec166ada90e46add4267b7e7c934790cba9bd5af6b8380a4fbfb5aff"

View File

@@ -59,6 +59,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
file://CVE-2022-0204.patch \
file://CVE-2022-39176.patch \
file://CVE-2022-3637.patch \
file://CVE-2023-45866.patch \
"
S = "${WORKDIR}/bluez-${PV}"

View File

@@ -0,0 +1,54 @@
From 25a471a83e02e1effb15d5a488b3f0085eaeb675 Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue, 10 Oct 2023 13:03:12 -0700
Subject: input.conf: Change default of ClassicBondedOnly
This changes the default of ClassicBondedOnly since defaulting to false
is not inline with HID specification which mandates the of Security Mode
4:
BLUETOOTH SPECIFICATION Page 84 of 123
Human Interface Device (HID) Profile:
5.4.3.4.2 Security Modes
Bluetooth HID Hosts shall use Security Mode 4 when interoperating with
Bluetooth HID devices that are compliant to the Bluetooth Core
Specification v2.1+EDR[6].
Upstream-Status: Backport [https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=25a471a83e02e1effb15d5a488b3f0085eaeb675]
CVE: CVE-2023-45866
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
---
profiles/input/device.c | 2 +-
profiles/input/input.conf | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/profiles/input/device.c b/profiles/input/device.c
index 375314e..0236488 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -93,7 +93,7 @@ struct input_device {
static int idle_timeout = 0;
static bool uhid_enabled = false;
-static bool classic_bonded_only = false;
+static bool classic_bonded_only = true;
void input_set_idle_timeout(int timeout)
{
diff --git a/profiles/input/input.conf b/profiles/input/input.conf
index 4c70bc5..d8645f3 100644
--- a/profiles/input/input.conf
+++ b/profiles/input/input.conf
@@ -17,7 +17,7 @@
# platforms may want to make sure that input connections only come from bonded
# device connections. Several older mice have been known for not supporting
# pairing/encryption.
-# Defaults to false to maximize device compatibility.
+# Defaults to true for security.
#ClassicBondedOnly=true
# LE upgrade security
--
2.25.1

View File

@@ -0,0 +1,283 @@
From 703418fe9d2e3b1e8d594df5788d8001a8116265 Mon Sep 17 00:00:00 2001
From: Jeffrey Bencteux <jeffbencteux@gmail.com>
Date: Fri, 30 Jun 2023 19:02:45 +0200
Subject: [PATCH] CVE-2023-40303: ftpd,rcp,rlogin,rsh,rshd,uucpd: fix: check
set*id() return values
Several setuid(), setgid(), seteuid() and setguid() return values
were not checked in ftpd/rcp/rlogin/rsh/rshd/uucpd code potentially
leading to potential security issues.
CVE: CVE-2023-40303
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=e4e65c03f4c11292a3e40ef72ca3f194c8bffdd6]
Signed-off-by: Jeffrey Bencteux <jeffbencteux@gmail.com>
Signed-off-by: Simon Josefsson <simon@josefsson.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
ftpd/ftpd.c | 10 +++++++---
src/rcp.c | 39 +++++++++++++++++++++++++++++++++------
src/rlogin.c | 11 +++++++++--
src/rsh.c | 25 +++++++++++++++++++++----
src/rshd.c | 20 +++++++++++++++++---
src/uucpd.c | 15 +++++++++++++--
6 files changed, 100 insertions(+), 20 deletions(-)
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index 5db88d0..b52b122 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -862,7 +862,9 @@ end_login (struct credentials *pcred)
char *remotehost = pcred->remotehost;
int atype = pcred->auth_type;
- seteuid ((uid_t) 0);
+ if (seteuid ((uid_t) 0) == -1)
+ _exit (EXIT_FAILURE);
+
if (pcred->logged_in)
{
logwtmp_keep_open (ttyline, "", "");
@@ -1151,7 +1153,8 @@ getdatasock (const char *mode)
if (data >= 0)
return fdopen (data, mode);
- seteuid ((uid_t) 0);
+ if (seteuid ((uid_t) 0) == -1)
+ _exit (EXIT_FAILURE);
s = socket (ctrl_addr.ss_family, SOCK_STREAM, 0);
if (s < 0)
goto bad;
@@ -1978,7 +1981,8 @@ passive (int epsv, int af)
else /* !AF_INET6 */
((struct sockaddr_in *) &pasv_addr)->sin_port = 0;
- seteuid ((uid_t) 0);
+ if (seteuid ((uid_t) 0) == -1)
+ _exit (EXIT_FAILURE);
if (bind (pdata, (struct sockaddr *) &pasv_addr, pasv_addrlen) < 0)
{
if (seteuid ((uid_t) cred.uid))
diff --git a/src/rcp.c b/src/rcp.c
index bafa35f..366295c 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -347,14 +347,23 @@ main (int argc, char *argv[])
if (from_option)
{ /* Follow "protocol", send data. */
response ();
- setuid (userid);
+
+ if (setuid (userid) == -1)
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
+ }
+
source (argc, argv);
exit (errs);
}
if (to_option)
{ /* Receive data. */
- setuid (userid);
+ if (setuid (userid) == -1)
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
+ }
+
sink (argc, argv);
exit (errs);
}
@@ -539,7 +548,11 @@ toremote (char *targ, int argc, char *argv[])
if (response () < 0)
exit (EXIT_FAILURE);
free (bp);
- setuid (userid);
+
+ if (setuid (userid) == -1)
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
+ }
}
source (1, argv + i);
close (rem);
@@ -634,7 +647,12 @@ tolocal (int argc, char *argv[])
++errs;
continue;
}
- seteuid (userid);
+
+ if (seteuid (userid) == -1)
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (seteuid() failed)");
+ }
+
#if defined IP_TOS && defined IPPROTO_IP && defined IPTOS_THROUGHPUT
sslen = sizeof (ss);
(void) getpeername (rem, (struct sockaddr *) &ss, &sslen);
@@ -647,7 +665,12 @@ tolocal (int argc, char *argv[])
#endif
vect[0] = target;
sink (1, vect);
- seteuid (effuid);
+
+ if (seteuid (effuid) == -1)
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (seteuid() failed)");
+ }
+
close (rem);
rem = -1;
#ifdef SHISHI
@@ -1453,7 +1476,11 @@ susystem (char *s, int userid)
return (127);
case 0:
- setuid (userid);
+ if (setuid (userid) == -1)
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
+ }
+
execl (PATH_BSHELL, "sh", "-c", s, NULL);
_exit (127);
}
diff --git a/src/rlogin.c b/src/rlogin.c
index e5e11a7..6b38901 100644
--- a/src/rlogin.c
+++ b/src/rlogin.c
@@ -649,8 +649,15 @@ try_connect:
/* Now change to the real user ID. We have to be set-user-ID root
to get the privileged port that rcmd () uses. We now want, however,
to run as the real user who invoked us. */
- seteuid (uid);
- setuid (uid);
+ if (seteuid (uid) == -1)
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (seteuid() failed)");
+ }
+
+ if (setuid (uid) == -1)
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
+ }
doit (&osmask); /* The old mask will activate SIGURG and SIGUSR1! */
diff --git a/src/rsh.c b/src/rsh.c
index bd70372..b451a70 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -278,8 +278,17 @@ main (int argc, char **argv)
{
if (asrsh)
*argv = (char *) "rlogin";
- seteuid (getuid ());
- setuid (getuid ());
+
+ if (seteuid (getuid ()) == -1)
+ {
+ error (EXIT_FAILURE, errno, "seteuid() failed");
+ }
+
+ if (setuid (getuid ()) == -1)
+ {
+ error (EXIT_FAILURE, errno, "setuid() failed");
+ }
+
execv (PATH_RLOGIN, argv);
error (EXIT_FAILURE, errno, "cannot execute %s", PATH_RLOGIN);
}
@@ -543,8 +552,16 @@ try_connect:
error (0, errno, "setsockopt DEBUG (ignored)");
}
- seteuid (uid);
- setuid (uid);
+ if (seteuid (uid) == -1)
+ {
+ error (EXIT_FAILURE, errno, "seteuid() failed");
+ }
+
+ if (setuid (uid) == -1)
+ {
+ error (EXIT_FAILURE, errno, "setuid() failed");
+ }
+
#ifdef HAVE_SIGACTION
sigemptyset (&sigs);
sigaddset (&sigs, SIGINT);
diff --git a/src/rshd.c b/src/rshd.c
index b824a10..8cdcd06 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -1848,8 +1848,18 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
pwd->pw_shell = PATH_BSHELL;
/* Set the gid, then uid to become the user specified by "locuser" */
- setegid ((gid_t) pwd->pw_gid);
- setgid ((gid_t) pwd->pw_gid);
+ if (setegid ((gid_t) pwd->pw_gid) == -1)
+ {
+ rshd_error ("Cannot drop privileges (setegid() failed)\n");
+ exit (EXIT_FAILURE);
+ }
+
+ if (setgid ((gid_t) pwd->pw_gid) == -1)
+ {
+ rshd_error ("Cannot drop privileges (setgid() failed)\n");
+ exit (EXIT_FAILURE);
+ }
+
#ifdef HAVE_INITGROUPS
initgroups (pwd->pw_name, pwd->pw_gid); /* BSD groups */
#endif
@@ -1871,7 +1881,11 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
}
#endif /* WITH_PAM */
- setuid ((uid_t) pwd->pw_uid);
+ if (setuid ((uid_t) pwd->pw_uid) == -1)
+ {
+ rshd_error ("Cannot drop privileges (setuid() failed)\n");
+ exit (EXIT_FAILURE);
+ }
/* We'll execute the client's command in the home directory
* of locuser. Note, that the chdir must be executed after
diff --git a/src/uucpd.c b/src/uucpd.c
index 55c3d44..6aba294 100644
--- a/src/uucpd.c
+++ b/src/uucpd.c
@@ -254,7 +254,12 @@ doit (struct sockaddr *sap, socklen_t salen)
sprintf (Username, "USER=%s", user);
sprintf (Logname, "LOGNAME=%s", user);
dologin (pw, sap, salen);
- setgid (pw->pw_gid);
+
+ if (setgid (pw->pw_gid) == -1)
+ {
+ fprintf (stderr, "setgid() failed");
+ return;
+ }
#ifdef HAVE_INITGROUPS
initgroups (pw->pw_name, pw->pw_gid);
#endif
@@ -263,7 +268,13 @@ doit (struct sockaddr *sap, socklen_t salen)
fprintf (stderr, "Login incorrect.");
return;
}
- setuid (pw->pw_uid);
+
+ if (setuid (pw->pw_uid) == -1)
+ {
+ fprintf (stderr, "setuid() failed");
+ return;
+ }
+
execl (uucico_location, "uucico", NULL);
perror ("uucico server: execl");
}
--
2.25.1

View File

@@ -0,0 +1,254 @@
From 70fe022f9dac760eaece0228cad17e3d29a57fb8 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@josefsson.org>
Date: Mon, 31 Jul 2023 13:59:05 +0200
Subject: [PATCH] CVE-2023-40303: Indent changes in previous commit.
CVE: CVE-2023-40303
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=9122999252c7e21eb7774de11d539748e7bdf46d]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
src/rcp.c | 42 ++++++++++++++++++++++++------------------
src/rlogin.c | 12 ++++++------
src/rsh.c | 24 ++++++++++++------------
src/rshd.c | 24 ++++++++++++------------
src/uucpd.c | 16 ++++++++--------
5 files changed, 62 insertions(+), 56 deletions(-)
diff --git a/src/rcp.c b/src/rcp.c
index cdcf8500..652f22e6 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -347,9 +347,10 @@ main (int argc, char *argv[])
response ();
if (setuid (userid) == -1)
- {
- error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
- }
+ {
+ error (EXIT_FAILURE, 0,
+ "Could not drop privileges (setuid() failed)");
+ }
source (argc, argv);
exit (errs);
@@ -358,9 +359,10 @@ main (int argc, char *argv[])
if (to_option)
{ /* Receive data. */
if (setuid (userid) == -1)
- {
- error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
- }
+ {
+ error (EXIT_FAILURE, 0,
+ "Could not drop privileges (setuid() failed)");
+ }
sink (argc, argv);
exit (errs);
@@ -548,9 +550,10 @@ toremote (char *targ, int argc, char *argv[])
free (bp);
if (setuid (userid) == -1)
- {
- error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
- }
+ {
+ error (EXIT_FAILURE, 0,
+ "Could not drop privileges (setuid() failed)");
+ }
}
source (1, argv + i);
close (rem);
@@ -645,9 +648,10 @@ tolocal (int argc, char *argv[])
}
if (seteuid (userid) == -1)
- {
- error (EXIT_FAILURE, 0, "Could not drop privileges (seteuid() failed)");
- }
+ {
+ error (EXIT_FAILURE, 0,
+ "Could not drop privileges (seteuid() failed)");
+ }
#if defined IP_TOS && defined IPPROTO_IP && defined IPTOS_THROUGHPUT
sslen = sizeof (ss);
@@ -663,9 +667,10 @@ tolocal (int argc, char *argv[])
sink (1, vect);
if (seteuid (effuid) == -1)
- {
- error (EXIT_FAILURE, 0, "Could not drop privileges (seteuid() failed)");
- }
+ {
+ error (EXIT_FAILURE, 0,
+ "Could not drop privileges (seteuid() failed)");
+ }
close (rem);
rem = -1;
@@ -1465,9 +1470,10 @@ susystem (char *s, int userid)
case 0:
if (setuid (userid) == -1)
- {
- error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
- }
+ {
+ error (EXIT_FAILURE, 0,
+ "Could not drop privileges (setuid() failed)");
+ }
execl (PATH_BSHELL, "sh", "-c", s, NULL);
_exit (127);
diff --git a/src/rlogin.c b/src/rlogin.c
index c543de0c..4360202f 100644
--- a/src/rlogin.c
+++ b/src/rlogin.c
@@ -648,14 +648,14 @@ try_connect:
to get the privileged port that rcmd () uses. We now want, however,
to run as the real user who invoked us. */
if (seteuid (uid) == -1)
- {
- error (EXIT_FAILURE, 0, "Could not drop privileges (seteuid() failed)");
- }
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (seteuid() failed)");
+ }
if (setuid (uid) == -1)
- {
- error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
- }
+ {
+ error (EXIT_FAILURE, 0, "Could not drop privileges (setuid() failed)");
+ }
doit (&osmask); /* The old mask will activate SIGURG and SIGUSR1! */
diff --git a/src/rsh.c b/src/rsh.c
index 6f60667d..179b47cd 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -278,14 +278,14 @@ main (int argc, char **argv)
*argv = (char *) "rlogin";
if (seteuid (getuid ()) == -1)
- {
- error (EXIT_FAILURE, errno, "seteuid() failed");
- }
+ {
+ error (EXIT_FAILURE, errno, "seteuid() failed");
+ }
if (setuid (getuid ()) == -1)
- {
- error (EXIT_FAILURE, errno, "setuid() failed");
- }
+ {
+ error (EXIT_FAILURE, errno, "setuid() failed");
+ }
execv (PATH_RLOGIN, argv);
error (EXIT_FAILURE, errno, "cannot execute %s", PATH_RLOGIN);
@@ -551,14 +551,14 @@ try_connect:
}
if (seteuid (uid) == -1)
- {
- error (EXIT_FAILURE, errno, "seteuid() failed");
- }
+ {
+ error (EXIT_FAILURE, errno, "seteuid() failed");
+ }
if (setuid (uid) == -1)
- {
- error (EXIT_FAILURE, errno, "setuid() failed");
- }
+ {
+ error (EXIT_FAILURE, errno, "setuid() failed");
+ }
#ifdef HAVE_SIGACTION
sigemptyset (&sigs);
diff --git a/src/rshd.c b/src/rshd.c
index 707790e7..3a153a18 100644
--- a/src/rshd.c
+++ b/src/rshd.c
@@ -1848,16 +1848,16 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
/* Set the gid, then uid to become the user specified by "locuser" */
if (setegid ((gid_t) pwd->pw_gid) == -1)
- {
- rshd_error ("Cannot drop privileges (setegid() failed)\n");
- exit (EXIT_FAILURE);
- }
+ {
+ rshd_error ("Cannot drop privileges (setegid() failed)\n");
+ exit (EXIT_FAILURE);
+ }
if (setgid ((gid_t) pwd->pw_gid) == -1)
- {
- rshd_error ("Cannot drop privileges (setgid() failed)\n");
- exit (EXIT_FAILURE);
- }
+ {
+ rshd_error ("Cannot drop privileges (setgid() failed)\n");
+ exit (EXIT_FAILURE);
+ }
#ifdef HAVE_INITGROUPS
initgroups (pwd->pw_name, pwd->pw_gid); /* BSD groups */
@@ -1881,10 +1881,10 @@ doit (int sockfd, struct sockaddr *fromp, socklen_t fromlen)
#endif /* WITH_PAM */
if (setuid ((uid_t) pwd->pw_uid) == -1)
- {
- rshd_error ("Cannot drop privileges (setuid() failed)\n");
- exit (EXIT_FAILURE);
- }
+ {
+ rshd_error ("Cannot drop privileges (setuid() failed)\n");
+ exit (EXIT_FAILURE);
+ }
/* We'll execute the client's command in the home directory
* of locuser. Note, that the chdir must be executed after
diff --git a/src/uucpd.c b/src/uucpd.c
index 29cfce35..fde7b9c9 100644
--- a/src/uucpd.c
+++ b/src/uucpd.c
@@ -254,10 +254,10 @@ doit (struct sockaddr *sap, socklen_t salen)
dologin (pw, sap, salen);
if (setgid (pw->pw_gid) == -1)
- {
- fprintf (stderr, "setgid() failed");
- return;
- }
+ {
+ fprintf (stderr, "setgid() failed");
+ return;
+ }
#ifdef HAVE_INITGROUPS
initgroups (pw->pw_name, pw->pw_gid);
#endif
@@ -268,10 +268,10 @@ doit (struct sockaddr *sap, socklen_t salen)
}
if (setuid (pw->pw_uid) == -1)
- {
- fprintf (stderr, "setuid() failed");
- return;
- }
+ {
+ fprintf (stderr, "setuid() failed");
+ return;
+ }
execl (uucico_location, "uucico", NULL);
perror ("uucico server: execl");

View File

@@ -25,6 +25,8 @@ SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \
file://fix-buffer-fortify-tfpt.patch \
file://CVE-2021-40491.patch \
file://CVE-2022-39028.patch \
file://0001-CVE-2023-40303-ftpd-rcp-rlogin-rsh-rshd-uucpd-fix-ch.patch \
file://0002-CVE-2023-40303-Indent-changes-in-previous-commit.patch \
"
SRC_URI[md5sum] = "04852c26c47cc8c6b825f2b74f191f52"

View File

@@ -5,8 +5,8 @@ SECTION = "network"
LICENSE = "PD"
LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04"
SRCREV = "22a5de3ef637990ce03141f786fbdb327e9c5a3f"
PV = "20221107"
SRCREV = "aae7c68671d225e6d35224613d5b98192b9b2ffe"
PV = "20230416"
PE = "1"
SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=main"

View File

@@ -0,0 +1,189 @@
From f6213e03887237714eb5bcfc9089c707069f87c5 Mon Sep 17 00:00:00 2001
From: Damien Miller <djm@mindrot.org>
Date: Fri, 1 Oct 2021 16:35:49 +1000
Subject: [PATCH 01/12] make OPENSSL_HAS_ECC checks more thorough
ok dtucker
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/dee22129bbc61e25b1003adfa2bc584c5406ef2d]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-pkcs11-client.c | 16 ++++++++--------
ssh-pkcs11.c | 26 +++++++++++++-------------
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
index 8a0ffef..41114c7 100644
--- a/ssh-pkcs11-client.c
+++ b/ssh-pkcs11-client.c
@@ -163,7 +163,7 @@ rsa_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, int padding)
return (ret);
}
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
static ECDSA_SIG *
ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
const BIGNUM *rp, EC_KEY *ec)
@@ -220,12 +220,12 @@ ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
sshbuf_free(msg);
return (ret);
}
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
static RSA_METHOD *helper_rsa;
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
static EC_KEY_METHOD *helper_ecdsa;
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
/* redirect private key crypto operations to the ssh-pkcs11-helper */
static void
@@ -233,10 +233,10 @@ wrap_key(struct sshkey *k)
{
if (k->type == KEY_RSA)
RSA_set_method(k->rsa, helper_rsa);
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
else if (k->type == KEY_ECDSA)
EC_KEY_set_method(k->ecdsa, helper_ecdsa);
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
else
fatal("%s: unknown key type", __func__);
}
@@ -247,7 +247,7 @@ pkcs11_start_helper_methods(void)
if (helper_rsa != NULL)
return (0);
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
int (*orig_sign)(int, const unsigned char *, int, unsigned char *,
unsigned int *, const BIGNUM *, const BIGNUM *, EC_KEY *) = NULL;
if (helper_ecdsa != NULL)
@@ -257,7 +257,7 @@ pkcs11_start_helper_methods(void)
return (-1);
EC_KEY_METHOD_get_sign(helper_ecdsa, &orig_sign, NULL, NULL);
EC_KEY_METHOD_set_sign(helper_ecdsa, orig_sign, NULL, ecdsa_do_sign);
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
if ((helper_rsa = RSA_meth_dup(RSA_get_default_method())) == NULL)
fatal("%s: RSA_meth_dup failed", __func__);
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index a302c79..b56a41b 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -78,7 +78,7 @@ struct pkcs11_key {
int pkcs11_interactive = 0;
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
static void
ossl_error(const char *msg)
{
@@ -89,7 +89,7 @@ ossl_error(const char *msg)
error("%s: libcrypto error: %.100s", __func__,
ERR_error_string(e, NULL));
}
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
int
pkcs11_init(int interactive)
@@ -190,10 +190,10 @@ pkcs11_del_provider(char *provider_id)
static RSA_METHOD *rsa_method;
static int rsa_idx = 0;
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
static EC_KEY_METHOD *ec_key_method;
static int ec_key_idx = 0;
-#endif
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
/* release a wrapped object */
static void
@@ -492,7 +492,7 @@ pkcs11_rsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
return (0);
}
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
/* openssl callback doing the actual signing operation */
static ECDSA_SIG *
ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
@@ -604,7 +604,7 @@ pkcs11_ecdsa_wrap(struct pkcs11_provider *provider, CK_ULONG slotidx,
return (0);
}
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
/* remove trailing spaces */
static void
@@ -679,7 +679,7 @@ pkcs11_key_included(struct sshkey ***keysp, int *nkeys, struct sshkey *key)
return (0);
}
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
static struct sshkey *
pkcs11_fetch_ecdsa_pubkey(struct pkcs11_provider *p, CK_ULONG slotidx,
CK_OBJECT_HANDLE *obj)
@@ -802,7 +802,7 @@ fail:
return (key);
}
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
static struct sshkey *
pkcs11_fetch_rsa_pubkey(struct pkcs11_provider *p, CK_ULONG slotidx,
@@ -910,7 +910,7 @@ pkcs11_fetch_x509_pubkey(struct pkcs11_provider *p, CK_ULONG slotidx,
#endif
struct sshkey *key = NULL;
int i;
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
int nid;
#endif
const u_char *cp;
@@ -999,7 +999,7 @@ pkcs11_fetch_x509_pubkey(struct pkcs11_provider *p, CK_ULONG slotidx,
key->type = KEY_RSA;
key->flags |= SSHKEY_FLAG_EXT;
rsa = NULL; /* now owned by key */
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
} else if (EVP_PKEY_base_id(evp) == EVP_PKEY_EC) {
if (EVP_PKEY_get0_EC_KEY(evp) == NULL) {
error("invalid x509; no ec key");
@@ -1030,7 +1030,7 @@ pkcs11_fetch_x509_pubkey(struct pkcs11_provider *p, CK_ULONG slotidx,
key->type = KEY_ECDSA;
key->flags |= SSHKEY_FLAG_EXT;
ec = NULL; /* now owned by key */
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
} else {
error("unknown certificate key type");
goto out;
@@ -1237,11 +1237,11 @@ pkcs11_fetch_keys(struct pkcs11_provider *p, CK_ULONG slotidx,
case CKK_RSA:
key = pkcs11_fetch_rsa_pubkey(p, slotidx, &obj);
break;
-#ifdef HAVE_EC_KEY_METHOD_NEW
+#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
case CKK_ECDSA:
key = pkcs11_fetch_ecdsa_pubkey(p, slotidx, &obj);
break;
-#endif /* HAVE_EC_KEY_METHOD_NEW */
+#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
default:
/* XXX print key type? */
key = NULL;
--
2.41.0

View File

@@ -0,0 +1,581 @@
From 92cebfbcc221c9ef3f6bbb78da3d7699c0ae56be Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Wed, 19 Jul 2023 14:03:45 +0000
Subject: [PATCH 02/12] upstream: Separate ssh-pkcs11-helpers for each p11
module
Make ssh-pkcs11-client start an independent helper for each provider,
providing better isolation between modules and reliability if a single
module misbehaves.
This also implements reference counting of PKCS#11-hosted keys,
allowing ssh-pkcs11-helper subprocesses to be automatically reaped
when no remaining keys reference them. This fixes some bugs we have
that make PKCS11 keys unusable after they have been deleted, e.g.
https://bugzilla.mindrot.org/show_bug.cgi?id=3125
ok markus@
OpenBSD-Commit-ID: 0ce188b14fe271ab0568f4500070d96c5657244e
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/099cdf59ce1e72f55d421c8445bf6321b3004755]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-pkcs11-client.c | 372 +++++++++++++++++++++++++++++++++-----------
1 file changed, 282 insertions(+), 90 deletions(-)
diff --git a/ssh-pkcs11-client.c b/ssh-pkcs11-client.c
index 41114c7..4f3c6ed 100644
--- a/ssh-pkcs11-client.c
+++ b/ssh-pkcs11-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-pkcs11-client.c,v 1.16 2020/01/25 00:03:36 djm Exp $ */
+/* $OpenBSD: ssh-pkcs11-client.c,v 1.18 2023/07/19 14:03:45 djm Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
* Copyright (c) 2014 Pedro Martelletto. All rights reserved.
@@ -30,12 +30,11 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
+#include <limits.h>
#include <openssl/ecdsa.h>
#include <openssl/rsa.h>
-#include "openbsd-compat/openssl-compat.h"
-
#include "pathnames.h"
#include "xmalloc.h"
#include "sshbuf.h"
@@ -47,18 +46,140 @@
#include "ssh-pkcs11.h"
#include "ssherr.h"
+#include "openbsd-compat/openssl-compat.h"
+
/* borrows code from sftp-server and ssh-agent */
-static int fd = -1;
-static pid_t pid = -1;
+/*
+ * Maintain a list of ssh-pkcs11-helper subprocesses. These may be looked up
+ * by provider path or their unique EC/RSA METHOD pointers.
+ */
+struct helper {
+ char *path;
+ pid_t pid;
+ int fd;
+ RSA_METHOD *rsa_meth;
+ EC_KEY_METHOD *ec_meth;
+ int (*rsa_finish)(RSA *rsa);
+ void (*ec_finish)(EC_KEY *key);
+ size_t nrsa, nec; /* number of active keys of each type */
+};
+static struct helper **helpers;
+static size_t nhelpers;
+
+static struct helper *
+helper_by_provider(const char *path)
+{
+ size_t i;
+
+ for (i = 0; i < nhelpers; i++) {
+ if (helpers[i] == NULL || helpers[i]->path == NULL ||
+ helpers[i]->fd == -1)
+ continue;
+ if (strcmp(helpers[i]->path, path) == 0)
+ return helpers[i];
+ }
+ return NULL;
+}
+
+static struct helper *
+helper_by_rsa(const RSA *rsa)
+{
+ size_t i;
+ const RSA_METHOD *meth;
+
+ if ((meth = RSA_get_method(rsa)) == NULL)
+ return NULL;
+ for (i = 0; i < nhelpers; i++) {
+ if (helpers[i] != NULL && helpers[i]->rsa_meth == meth)
+ return helpers[i];
+ }
+ return NULL;
+
+}
+
+static struct helper *
+helper_by_ec(const EC_KEY *ec)
+{
+ size_t i;
+ const EC_KEY_METHOD *meth;
+
+ if ((meth = EC_KEY_get_method(ec)) == NULL)
+ return NULL;
+ for (i = 0; i < nhelpers; i++) {
+ if (helpers[i] != NULL && helpers[i]->ec_meth == meth)
+ return helpers[i];
+ }
+ return NULL;
+
+}
+
+static void
+helper_free(struct helper *helper)
+{
+ size_t i;
+ int found = 0;
+
+ if (helper == NULL)
+ return;
+ if (helper->path == NULL || helper->ec_meth == NULL ||
+ helper->rsa_meth == NULL)
+ fatal("%s: inconsistent helper", __func__);
+ debug3("%s: free helper for provider %s", __func__ , helper->path);
+ for (i = 0; i < nhelpers; i++) {
+ if (helpers[i] == helper) {
+ if (found)
+ fatal("%s: helper recorded more than once", __func__);
+ found = 1;
+ }
+ else if (found)
+ helpers[i - 1] = helpers[i];
+ }
+ if (found) {
+ helpers = xrecallocarray(helpers, nhelpers,
+ nhelpers - 1, sizeof(*helpers));
+ nhelpers--;
+ }
+ free(helper->path);
+ EC_KEY_METHOD_free(helper->ec_meth);
+ RSA_meth_free(helper->rsa_meth);
+ free(helper);
+}
+
+static void
+helper_terminate(struct helper *helper)
+{
+ if (helper == NULL) {
+ return;
+ } else if (helper->fd == -1) {
+ debug3("%s: already terminated", __func__);
+ } else {
+ debug3("terminating helper for %s; "
+ "remaining %zu RSA %zu ECDSA", __func__,
+ helper->path, helper->nrsa, helper->nec);
+ close(helper->fd);
+ /* XXX waitpid() */
+ helper->fd = -1;
+ helper->pid = -1;
+ }
+ /*
+ * Don't delete the helper entry until there are no remaining keys
+ * that reference it. Otherwise, any signing operation would call
+ * a free'd METHOD pointer and that would be bad.
+ */
+ if (helper->nrsa == 0 && helper->nec == 0)
+ helper_free(helper);
+}
static void
-send_msg(struct sshbuf *m)
+send_msg(int fd, struct sshbuf *m)
{
u_char buf[4];
size_t mlen = sshbuf_len(m);
int r;
+ if (fd == -1)
+ return;
POKE_U32(buf, mlen);
if (atomicio(vwrite, fd, buf, 4) != 4 ||
atomicio(vwrite, fd, sshbuf_mutable_ptr(m),
@@ -69,12 +190,15 @@ send_msg(struct sshbuf *m)
}
static int
-recv_msg(struct sshbuf *m)
+recv_msg(int fd, struct sshbuf *m)
{
u_int l, len;
u_char c, buf[1024];
int r;
+ sshbuf_reset(m);
+ if (fd == -1)
+ return 0; /* XXX */
if ((len = atomicio(read, fd, buf, 4)) != 4) {
error("read from helper failed: %u", len);
return (0); /* XXX */
@@ -83,7 +207,6 @@ recv_msg(struct sshbuf *m)
if (len > 256 * 1024)
fatal("response too long: %u", len);
/* read len bytes into m */
- sshbuf_reset(m);
while (len > 0) {
l = len;
if (l > sizeof(buf))
@@ -104,14 +227,17 @@ recv_msg(struct sshbuf *m)
int
pkcs11_init(int interactive)
{
- return (0);
+ return 0;
}
void
pkcs11_terminate(void)
{
- if (fd >= 0)
- close(fd);
+ size_t i;
+
+ debug3("%s: terminating %zu helpers", __func__, nhelpers);
+ for (i = 0; i < nhelpers; i++)
+ helper_terminate(helpers[i]);
}
static int
@@ -122,7 +248,11 @@ rsa_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, int padding)
u_char *blob = NULL, *signature = NULL;
size_t blen, slen = 0;
int r, ret = -1;
+ struct helper *helper;
+ if ((helper = helper_by_rsa(rsa)) == NULL || helper->fd == -1)
+ fatal("%s: no helper for PKCS11 key", __func__);
+ debug3("%s: signing with PKCS11 provider %s", __func__, helper->path);
if (padding != RSA_PKCS1_PADDING)
goto fail;
key = sshkey_new(KEY_UNSPEC);
@@ -144,10 +274,10 @@ rsa_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, int padding)
(r = sshbuf_put_string(msg, from, flen)) != 0 ||
(r = sshbuf_put_u32(msg, 0)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
- send_msg(msg);
+ send_msg(helper->fd, msg);
sshbuf_reset(msg);
- if (recv_msg(msg) == SSH2_AGENT_SIGN_RESPONSE) {
+ if (recv_msg(helper->fd, msg) == SSH2_AGENT_SIGN_RESPONSE) {
if ((r = sshbuf_get_string(msg, &signature, &slen)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
if (slen <= (size_t)RSA_size(rsa)) {
@@ -163,7 +293,26 @@ rsa_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, int padding)
return (ret);
}
-#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
+static int
+rsa_finish(RSA *rsa)
+{
+ struct helper *helper;
+
+ if ((helper = helper_by_rsa(rsa)) == NULL)
+ fatal("%s: no helper for PKCS11 key", __func__);
+ debug3("%s: free PKCS11 RSA key for provider %s", __func__, helper->path);
+ if (helper->rsa_finish != NULL)
+ helper->rsa_finish(rsa);
+ if (helper->nrsa == 0)
+ fatal("%s: RSA refcount error", __func__);
+ helper->nrsa--;
+ debug3("%s: provider %s remaining keys: %zu RSA %zu ECDSA", __func__,
+ helper->path, helper->nrsa, helper->nec);
+ if (helper->nrsa == 0 && helper->nec == 0)
+ helper_terminate(helper);
+ return 1;
+}
+
static ECDSA_SIG *
ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
const BIGNUM *rp, EC_KEY *ec)
@@ -175,7 +324,11 @@ ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
u_char *blob = NULL, *signature = NULL;
size_t blen, slen = 0;
int r, nid;
+ struct helper *helper;
+ if ((helper = helper_by_ec(ec)) == NULL || helper->fd == -1)
+ fatal("%s: no helper for PKCS11 key", __func__);
+ debug3("%s: signing with PKCS11 provider %s", __func__, helper->path);
nid = sshkey_ecdsa_key_to_nid(ec);
if (nid < 0) {
error("%s: couldn't get curve nid", __func__);
@@ -203,10 +356,10 @@ ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
(r = sshbuf_put_string(msg, dgst, dgst_len)) != 0 ||
(r = sshbuf_put_u32(msg, 0)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
- send_msg(msg);
+ send_msg(helper->fd, msg);
sshbuf_reset(msg);
- if (recv_msg(msg) == SSH2_AGENT_SIGN_RESPONSE) {
+ if (recv_msg(helper->fd, msg) == SSH2_AGENT_SIGN_RESPONSE) {
if ((r = sshbuf_get_string(msg, &signature, &slen)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
cp = signature;
@@ -220,75 +373,110 @@ ecdsa_do_sign(const unsigned char *dgst, int dgst_len, const BIGNUM *inv,
sshbuf_free(msg);
return (ret);
}
-#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
-static RSA_METHOD *helper_rsa;
-#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
-static EC_KEY_METHOD *helper_ecdsa;
-#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
+static void
+ecdsa_do_finish(EC_KEY *ec)
+{
+ struct helper *helper;
+
+ if ((helper = helper_by_ec(ec)) == NULL)
+ fatal("%s: no helper for PKCS11 key", __func__);
+ debug3("%s: free PKCS11 ECDSA key for provider %s", __func__, helper->path);
+ if (helper->ec_finish != NULL)
+ helper->ec_finish(ec);
+ if (helper->nec == 0)
+ fatal("%s: ECDSA refcount error", __func__);
+ helper->nec--;
+ debug3("%s: provider %s remaining keys: %zu RSA %zu ECDSA", __func__,
+ helper->path, helper->nrsa, helper->nec);
+ if (helper->nrsa == 0 && helper->nec == 0)
+ helper_terminate(helper);
+}
/* redirect private key crypto operations to the ssh-pkcs11-helper */
static void
-wrap_key(struct sshkey *k)
+wrap_key(struct helper *helper, struct sshkey *k)
{
- if (k->type == KEY_RSA)
- RSA_set_method(k->rsa, helper_rsa);
-#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
- else if (k->type == KEY_ECDSA)
- EC_KEY_set_method(k->ecdsa, helper_ecdsa);
-#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
- else
+ debug3("%s: wrap %s for provider %s", __func__, sshkey_type(k), helper->path);
+ if (k->type == KEY_RSA) {
+ RSA_set_method(k->rsa, helper->rsa_meth);
+ if (helper->nrsa++ >= INT_MAX)
+ fatal("%s: RSA refcount error", __func__);
+ } else if (k->type == KEY_ECDSA) {
+ EC_KEY_set_method(k->ecdsa, helper->ec_meth);
+ if (helper->nec++ >= INT_MAX)
+ fatal("%s: EC refcount error", __func__);
+ } else
fatal("%s: unknown key type", __func__);
+ k->flags |= SSHKEY_FLAG_EXT;
+ debug3("%s: provider %s remaining keys: %zu RSA %zu ECDSA", __func__,
+ helper->path, helper->nrsa, helper->nec);
}
static int
-pkcs11_start_helper_methods(void)
+pkcs11_start_helper_methods(struct helper *helper)
{
- if (helper_rsa != NULL)
- return (0);
-
-#if defined(OPENSSL_HAS_ECC) && defined(HAVE_EC_KEY_METHOD_NEW)
- int (*orig_sign)(int, const unsigned char *, int, unsigned char *,
+ int (*ec_init)(EC_KEY *key);
+ int (*ec_copy)(EC_KEY *dest, const EC_KEY *src);
+ int (*ec_set_group)(EC_KEY *key, const EC_GROUP *grp);
+ int (*ec_set_private)(EC_KEY *key, const BIGNUM *priv_key);
+ int (*ec_set_public)(EC_KEY *key, const EC_POINT *pub_key);
+ int (*ec_sign)(int, const unsigned char *, int, unsigned char *,
unsigned int *, const BIGNUM *, const BIGNUM *, EC_KEY *) = NULL;
- if (helper_ecdsa != NULL)
- return (0);
- helper_ecdsa = EC_KEY_METHOD_new(EC_KEY_OpenSSL());
- if (helper_ecdsa == NULL)
- return (-1);
- EC_KEY_METHOD_get_sign(helper_ecdsa, &orig_sign, NULL, NULL);
- EC_KEY_METHOD_set_sign(helper_ecdsa, orig_sign, NULL, ecdsa_do_sign);
-#endif /* OPENSSL_HAS_ECC && HAVE_EC_KEY_METHOD_NEW */
-
- if ((helper_rsa = RSA_meth_dup(RSA_get_default_method())) == NULL)
+ RSA_METHOD *rsa_meth;
+ EC_KEY_METHOD *ec_meth;
+
+ if ((ec_meth = EC_KEY_METHOD_new(EC_KEY_OpenSSL())) == NULL)
+ return -1;
+ EC_KEY_METHOD_get_sign(ec_meth, &ec_sign, NULL, NULL);
+ EC_KEY_METHOD_set_sign(ec_meth, ec_sign, NULL, ecdsa_do_sign);
+ EC_KEY_METHOD_get_init(ec_meth, &ec_init, &helper->ec_finish,
+ &ec_copy, &ec_set_group, &ec_set_private, &ec_set_public);
+ EC_KEY_METHOD_set_init(ec_meth, ec_init, ecdsa_do_finish,
+ ec_copy, ec_set_group, ec_set_private, ec_set_public);
+
+ if ((rsa_meth = RSA_meth_dup(RSA_get_default_method())) == NULL)
fatal("%s: RSA_meth_dup failed", __func__);
- if (!RSA_meth_set1_name(helper_rsa, "ssh-pkcs11-helper") ||
- !RSA_meth_set_priv_enc(helper_rsa, rsa_encrypt))
+ helper->rsa_finish = RSA_meth_get_finish(rsa_meth);
+ if (!RSA_meth_set1_name(rsa_meth, "ssh-pkcs11-helper") ||
+ !RSA_meth_set_priv_enc(rsa_meth, rsa_encrypt) ||
+ !RSA_meth_set_finish(rsa_meth, rsa_finish))
fatal("%s: failed to prepare method", __func__);
- return (0);
+ helper->ec_meth = ec_meth;
+ helper->rsa_meth = rsa_meth;
+ return 0;
}
-static int
-pkcs11_start_helper(void)
+static struct helper *
+pkcs11_start_helper(const char *path)
{
int pair[2];
- char *helper, *verbosity = NULL;
-
- if (log_level_get() >= SYSLOG_LEVEL_DEBUG1)
- verbosity = "-vvv";
-
- if (pkcs11_start_helper_methods() == -1) {
- error("pkcs11_start_helper_methods failed");
- return (-1);
- }
+ char *prog, *verbosity = NULL;
+ struct helper *helper;
+ pid_t pid;
+ if (nhelpers >= INT_MAX)
+ fatal("%s: too many helpers", __func__);
+ debug3("%s: start helper for %s", __func__, path);
if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) {
error("socketpair: %s", strerror(errno));
- return (-1);
+ return NULL;
+ }
+ helper = xcalloc(1, sizeof(*helper));
+ if (pkcs11_start_helper_methods(helper) == -1) {
+ error("pkcs11_start_helper_methods failed");
+ goto fail;
}
if ((pid = fork()) == -1) {
error("fork: %s", strerror(errno));
- return (-1);
+ fail:
+ close(pair[0]);
+ close(pair[1]);
+ RSA_meth_free(helper->rsa_meth);
+ EC_KEY_METHOD_free(helper->ec_meth);
+ free(helper);
+ return NULL;
} else if (pid == 0) {
if ((dup2(pair[1], STDIN_FILENO) == -1) ||
(dup2(pair[1], STDOUT_FILENO) == -1)) {
@@ -297,18 +485,27 @@ pkcs11_start_helper(void)
}
close(pair[0]);
close(pair[1]);
- helper = getenv("SSH_PKCS11_HELPER");
- if (helper == NULL || strlen(helper) == 0)
- helper = _PATH_SSH_PKCS11_HELPER;
+ prog = getenv("SSH_PKCS11_HELPER");
+ if (prog == NULL || strlen(prog) == 0)
+ prog = _PATH_SSH_PKCS11_HELPER;
+ if (log_level_get() >= SYSLOG_LEVEL_DEBUG1)
+ verbosity = "-vvv";
debug("%s: starting %s %s", __func__, helper,
verbosity == NULL ? "" : verbosity);
- execlp(helper, helper, verbosity, (char *)NULL);
- fprintf(stderr, "exec: %s: %s\n", helper, strerror(errno));
+ execlp(prog, prog, verbosity, (char *)NULL);
+ fprintf(stderr, "exec: %s: %s\n", prog, strerror(errno));
_exit(1);
}
close(pair[1]);
- fd = pair[0];
- return (0);
+ helper->fd = pair[0];
+ helper->path = xstrdup(path);
+ helper->pid = pid;
+ debug3("%s: helper %zu for \"%s\" on fd %d pid %ld", __func__, nhelpers,
+ helper->path, helper->fd, (long)helper->pid);
+ helpers = xrecallocarray(helpers, nhelpers,
+ nhelpers + 1, sizeof(*helpers));
+ helpers[nhelpers++] = helper;
+ return helper;
}
int
@@ -322,9 +519,11 @@ pkcs11_add_provider(char *name, char *pin, struct sshkey ***keysp,
size_t blen;
u_int nkeys, i;
struct sshbuf *msg;
+ struct helper *helper;
- if (fd < 0 && pkcs11_start_helper() < 0)
- return (-1);
+ if ((helper = helper_by_provider(name)) == NULL &&
+ (helper = pkcs11_start_helper(name)) == NULL)
+ return -1;
if ((msg = sshbuf_new()) == NULL)
fatal("%s: sshbuf_new failed", __func__);
@@ -332,10 +531,10 @@ pkcs11_add_provider(char *name, char *pin, struct sshkey ***keysp,
(r = sshbuf_put_cstring(msg, name)) != 0 ||
(r = sshbuf_put_cstring(msg, pin)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
- send_msg(msg);
+ send_msg(helper->fd, msg);
sshbuf_reset(msg);
- type = recv_msg(msg);
+ type = recv_msg(helper->fd, msg);
if (type == SSH2_AGENT_IDENTITIES_ANSWER) {
if ((r = sshbuf_get_u32(msg, &nkeys)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
@@ -350,7 +549,7 @@ pkcs11_add_provider(char *name, char *pin, struct sshkey ***keysp,
__func__, ssh_err(r));
if ((r = sshkey_from_blob(blob, blen, &k)) != 0)
fatal("%s: bad key: %s", __func__, ssh_err(r));
- wrap_key(k);
+ wrap_key(helper, k);
(*keysp)[i] = k;
if (labelsp)
(*labelsp)[i] = label;
@@ -371,22 +570,15 @@ pkcs11_add_provider(char *name, char *pin, struct sshkey ***keysp,
int
pkcs11_del_provider(char *name)
{
- int r, ret = -1;
- struct sshbuf *msg;
-
- if ((msg = sshbuf_new()) == NULL)
- fatal("%s: sshbuf_new failed", __func__);
- if ((r = sshbuf_put_u8(msg, SSH_AGENTC_REMOVE_SMARTCARD_KEY)) != 0 ||
- (r = sshbuf_put_cstring(msg, name)) != 0 ||
- (r = sshbuf_put_cstring(msg, "")) != 0)
- fatal("%s: buffer error: %s", __func__, ssh_err(r));
- send_msg(msg);
- sshbuf_reset(msg);
-
- if (recv_msg(msg) == SSH_AGENT_SUCCESS)
- ret = 0;
- sshbuf_free(msg);
- return (ret);
+ struct helper *helper;
+
+ /*
+ * ssh-agent deletes keys before calling this, so the helper entry
+ * should be gone before we get here.
+ */
+ debug3("%s: delete %s", __func__, name);
+ if ((helper = helper_by_provider(name)) != NULL)
+ helper_terminate(helper);
+ return 0;
}
-
#endif /* ENABLE_PKCS11 */
--
2.41.0

View File

@@ -0,0 +1,171 @@
From 2f1be98e83feb90665b9292eff8bb734537fd491 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Wed, 19 Jul 2023 14:02:27 +0000
Subject: [PATCH 03/12] upstream: Ensure FIDO/PKCS11 libraries contain expected
symbols
This checks via nlist(3) that candidate provider libraries contain one
of the symbols that we will require prior to dlopen(), which can cause
a number of side effects, including execution of constructors.
Feedback deraadt; ok markus
OpenBSD-Commit-ID: 1508a5fbd74e329e69a55b56c453c292029aefbe
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/29ef8a04866ca14688d5b7fed7b8b9deab851f77]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
misc.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++
misc.h | 1 +
ssh-pkcs11.c | 4 +++
ssh-sk.c | 6 ++--
4 files changed, 86 insertions(+), 2 deletions(-)
diff --git a/misc.c b/misc.c
index 3a31d5c..8a107e4 100644
--- a/misc.c
+++ b/misc.c
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -41,6 +42,9 @@
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
+#ifdef HAVE_NLIST_H
+#include <nlist.h>
+#endif
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
@@ -2266,3 +2270,76 @@ ssh_signal(int signum, sshsig_t handler)
}
return osa.sa_handler;
}
+
+
+/*
+ * Returns zero if the library at 'path' contains symbol 's', nonzero
+ * otherwise.
+ */
+int
+lib_contains_symbol(const char *path, const char *s)
+{
+#ifdef HAVE_NLIST_H
+ struct nlist nl[2];
+ int ret = -1, r;
+
+ memset(nl, 0, sizeof(nl));
+ nl[0].n_name = xstrdup(s);
+ nl[1].n_name = NULL;
+ if ((r = nlist(path, nl)) == -1) {
+ error("%s: nlist failed for %s", __func__, path);
+ goto out;
+ }
+ if (r != 0 || nl[0].n_value == 0 || nl[0].n_type == 0) {
+ error("%s: library %s does not contain symbol %s", __func__, path, s);
+ goto out;
+ }
+ /* success */
+ ret = 0;
+ out:
+ free(nl[0].n_name);
+ return ret;
+#else /* HAVE_NLIST_H */
+ int fd, ret = -1;
+ struct stat st;
+ void *m = NULL;
+ size_t sz = 0;
+
+ memset(&st, 0, sizeof(st));
+ if ((fd = open(path, O_RDONLY)) < 0) {
+ error("%s: open %s: %s", __func__, path, strerror(errno));
+ return -1;
+ }
+ if (fstat(fd, &st) != 0) {
+ error("%s: fstat %s: %s", __func__, path, strerror(errno));
+ goto out;
+ }
+ if (!S_ISREG(st.st_mode)) {
+ error("%s: %s is not a regular file", __func__, path);
+ goto out;
+ }
+ if (st.st_size < 0 ||
+ (size_t)st.st_size < strlen(s) ||
+ st.st_size >= INT_MAX/2) {
+ error("%s: %s bad size %lld", __func__, path, (long long)st.st_size);
+ goto out;
+ }
+ sz = (size_t)st.st_size;
+ if ((m = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED ||
+ m == NULL) {
+ error("%s: mmap %s: %s", __func__, path, strerror(errno));
+ goto out;
+ }
+ if (memmem(m, sz, s, strlen(s)) == NULL) {
+ error("%s: %s does not contain expected string %s", __func__, path, s);
+ goto out;
+ }
+ /* success */
+ ret = 0;
+ out:
+ if (m != NULL && m != MAP_FAILED)
+ munmap(m, sz);
+ close(fd);
+ return ret;
+#endif /* HAVE_NLIST_H */
+}
diff --git a/misc.h b/misc.h
index 4a05db2..3f9f4db 100644
--- a/misc.h
+++ b/misc.h
@@ -86,6 +86,7 @@ const char *atoi_err(const char *, int *);
int parse_absolute_time(const char *, uint64_t *);
void format_absolute_time(uint64_t, char *, size_t);
int path_absolute(const char *);
+int lib_contains_symbol(const char *, const char *);
void sock_set_v6only(int);
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index b56a41b..639a6f7 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -1499,6 +1499,10 @@ pkcs11_register_provider(char *provider_id, char *pin,
__func__, provider_id);
goto fail;
}
+ if (lib_contains_symbol(provider_id, "C_GetFunctionList") != 0) {
+ error("provider %s is not a PKCS11 library", provider_id);
+ goto fail;
+ }
/* open shared pkcs11-library */
if ((handle = dlopen(provider_id, RTLD_NOW)) == NULL) {
error("dlopen %s failed: %s", provider_id, dlerror());
diff --git a/ssh-sk.c b/ssh-sk.c
index 5ff9381..9df12cc 100644
--- a/ssh-sk.c
+++ b/ssh-sk.c
@@ -119,10 +119,12 @@ sshsk_open(const char *path)
#endif
return ret;
}
- if ((ret->dlhandle = dlopen(path, RTLD_NOW)) == NULL) {
- error("Provider \"%s\" dlopen failed: %s", path, dlerror());
+ if (lib_contains_symbol(path, "sk_api_version") != 0) {
+ error("provider %s is not an OpenSSH FIDO library", path);
goto fail;
}
+ if ((ret->dlhandle = dlopen(path, RTLD_NOW)) == NULL)
+ fatal("Provider \"%s\" dlopen failed: %s", path, dlerror());
if ((ret->sk_api_version = dlsym(ret->dlhandle,
"sk_api_version")) == NULL) {
error("Provider \"%s\" dlsym(sk_api_version) failed: %s",
--
2.41.0

View File

@@ -0,0 +1,34 @@
From 0862f338941bfdfb2cadee87de6d5fdca1b8f457 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Wed, 19 Jul 2023 13:55:53 +0000
Subject: [PATCH 04/12] upstream: terminate process if requested to load a
PKCS#11 provider that isn't a PKCS#11 provider; from / ok markus@
OpenBSD-Commit-ID: 39532cf18b115881bb4cfaee32084497aadfa05c
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/892506b13654301f69f9545f48213fc210e5c5cc]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-pkcs11.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index 639a6f7..7530acc 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -1508,10 +1508,8 @@ pkcs11_register_provider(char *provider_id, char *pin,
error("dlopen %s failed: %s", provider_id, dlerror());
goto fail;
}
- if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL) {
- error("dlsym(C_GetFunctionList) failed: %s", dlerror());
- goto fail;
- }
+ if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL)
+ fatal("dlsym(C_GetFunctionList) failed: %s", dlerror());
p = xcalloc(1, sizeof(*p));
p->name = xstrdup(provider_id);
p->handle = handle;
--
2.41.0

View File

@@ -0,0 +1,194 @@
From a6cee3905edf070c0de135d3f2ee5b74da1dbd28 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Tue, 26 May 2020 01:26:58 +0000
Subject: [PATCH 05/12] upstream: Restrict ssh-agent from signing web
challenges for FIDO
keys.
When signing messages in ssh-agent using a FIDO key that has an
application string that does not start with "ssh:", ensure that the
message being signed is one of the forms expected for the SSH protocol
(currently pubkey authentication and sshsig signatures).
This prevents ssh-agent forwarding on a host that has FIDO keys
attached granting the ability for the remote side to sign challenges
for web authentication using those keys too.
Note that the converse case of web browsers signing SSH challenges is
already precluded because no web RP can have the "ssh:" prefix in the
application string that we require.
ok markus@
OpenBSD-Commit-ID: 9ab6012574ed0352d2f097d307f4a988222d1b19
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/0c111eb84efba7c2a38b2cc3278901a0123161b9]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-agent.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 100 insertions(+), 10 deletions(-)
diff --git a/ssh-agent.c b/ssh-agent.c
index ceb348c..1794f35 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.255 2020/02/06 22:30:54 naddy Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.258 2020/05/26 01:26:58 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -77,6 +77,7 @@
#include "xmalloc.h"
#include "ssh.h"
+#include "ssh2.h"
#include "sshbuf.h"
#include "sshkey.h"
#include "authfd.h"
@@ -167,6 +168,9 @@ static long lifetime = 0;
static int fingerprint_hash = SSH_FP_HASH_DEFAULT;
+/* Refuse signing of non-SSH messages for web-origin FIDO keys */
+static int restrict_websafe = 1;
+
static void
close_socket(SocketEntry *e)
{
@@ -282,6 +286,80 @@ agent_decode_alg(struct sshkey *key, u_int flags)
return NULL;
}
+/*
+ * This function inspects a message to be signed by a FIDO key that has a
+ * web-like application string (i.e. one that does not begin with "ssh:".
+ * It checks that the message is one of those expected for SSH operations
+ * (pubkey userauth, sshsig, CA key signing) to exclude signing challenges
+ * for the web.
+ */
+static int
+check_websafe_message_contents(struct sshkey *key,
+ const u_char *msg, size_t len)
+{
+ int matched = 0;
+ struct sshbuf *b;
+ u_char m, n;
+ char *cp1 = NULL, *cp2 = NULL;
+ int r;
+ struct sshkey *mkey = NULL;
+
+ if ((b = sshbuf_from(msg, len)) == NULL)
+ fatal("%s: sshbuf_new", __func__);
+
+ /* SSH userauth request */
+ if ((r = sshbuf_get_string_direct(b, NULL, NULL)) == 0 && /* sess_id */
+ (r = sshbuf_get_u8(b, &m)) == 0 && /* SSH2_MSG_USERAUTH_REQUEST */
+ (r = sshbuf_get_cstring(b, NULL, NULL)) == 0 && /* server user */
+ (r = sshbuf_get_cstring(b, &cp1, NULL)) == 0 && /* service */
+ (r = sshbuf_get_cstring(b, &cp2, NULL)) == 0 && /* method */
+ (r = sshbuf_get_u8(b, &n)) == 0 && /* sig-follows */
+ (r = sshbuf_get_cstring(b, NULL, NULL)) == 0 && /* alg */
+ (r = sshkey_froms(b, &mkey)) == 0 && /* key */
+ sshbuf_len(b) == 0) {
+ debug("%s: parsed userauth", __func__);
+ if (m == SSH2_MSG_USERAUTH_REQUEST && n == 1 &&
+ strcmp(cp1, "ssh-connection") == 0 &&
+ strcmp(cp2, "publickey") == 0 &&
+ sshkey_equal(key, mkey)) {
+ debug("%s: well formed userauth", __func__);
+ matched = 1;
+ }
+ }
+ free(cp1);
+ free(cp2);
+ sshkey_free(mkey);
+ sshbuf_free(b);
+ if (matched)
+ return 1;
+
+ if ((b = sshbuf_from(msg, len)) == NULL)
+ fatal("%s: sshbuf_new", __func__);
+ cp1 = cp2 = NULL;
+ mkey = NULL;
+
+ /* SSHSIG */
+ if ((r = sshbuf_cmp(b, 0, "SSHSIG", 6)) == 0 &&
+ (r = sshbuf_consume(b, 6)) == 0 &&
+ (r = sshbuf_get_cstring(b, NULL, NULL)) == 0 && /* namespace */
+ (r = sshbuf_get_string_direct(b, NULL, NULL)) == 0 && /* reserved */
+ (r = sshbuf_get_cstring(b, NULL, NULL)) == 0 && /* hashalg */
+ (r = sshbuf_get_string_direct(b, NULL, NULL)) == 0 && /* H(msg) */
+ sshbuf_len(b) == 0) {
+ debug("%s: parsed sshsig", __func__);
+ matched = 1;
+ }
+
+ sshbuf_free(b);
+ if (matched)
+ return 1;
+
+ /* XXX CA signature operation */
+
+ error("web-origin key attempting to sign non-SSH message");
+ return 0;
+}
+
/* ssh2 only */
static void
process_sign_request2(SocketEntry *e)
@@ -314,14 +392,20 @@ process_sign_request2(SocketEntry *e)
verbose("%s: user refused key", __func__);
goto send;
}
- if (sshkey_is_sk(id->key) &&
- (id->key->sk_flags & SSH_SK_USER_PRESENCE_REQD)) {
- if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
- SSH_FP_DEFAULT)) == NULL)
- fatal("%s: fingerprint failed", __func__);
- notifier = notify_start(0,
- "Confirm user presence for key %s %s",
- sshkey_type(id->key), fp);
+ if (sshkey_is_sk(id->key)) {
+ if (strncmp(id->key->sk_application, "ssh:", 4) != 0 &&
+ !check_websafe_message_contents(key, data, dlen)) {
+ /* error already logged */
+ goto send;
+ }
+ if ((id->key->sk_flags & SSH_SK_USER_PRESENCE_REQD)) {
+ if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
+ SSH_FP_DEFAULT)) == NULL)
+ fatal("%s: fingerprint failed", __func__);
+ notifier = notify_start(0,
+ "Confirm user presence for key %s %s",
+ sshkey_type(id->key), fp);
+ }
}
if ((r = sshkey_sign(id->key, &signature, &slen,
data, dlen, agent_decode_alg(key, flags),
@@ -1214,7 +1298,7 @@ main(int ac, char **av)
__progname = ssh_get_progname(av[0]);
seed_rng();
- while ((ch = getopt(ac, av, "cDdksE:a:P:t:")) != -1) {
+ while ((ch = getopt(ac, av, "cDdksE:a:O:P:t:")) != -1) {
switch (ch) {
case 'E':
fingerprint_hash = ssh_digest_alg_by_name(optarg);
@@ -1229,6 +1313,12 @@ main(int ac, char **av)
case 'k':
k_flag++;
break;
+ case 'O':
+ if (strcmp(optarg, "no-restrict-websafe") == 0)
+ restrict_websafe = 0;
+ else
+ fatal("Unknown -O option");
+ break;
case 'P':
if (provider_whitelist != NULL)
fatal("-P option already specified");
--
2.41.0

View File

@@ -0,0 +1,73 @@
From a5d845b7b42861d18f43e83de9f24c7374d1b458 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Fri, 18 Sep 2020 08:16:38 +0000
Subject: [PATCH 06/12] upstream: handle multiple messages in a single read()
PR#183 by Dennis Kaarsemaker; feedback and ok markus@
OpenBSD-Commit-ID: 8570bb4d02d00cf70b98590716ea6a7d1cce68d1
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/52a03e9fca2d74eef953ddd4709250f365ca3975]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-agent.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/ssh-agent.c b/ssh-agent.c
index 1794f35..78f7268 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.258 2020/05/26 01:26:58 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.264 2020/09/18 08:16:38 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -853,8 +853,10 @@ send:
}
#endif /* ENABLE_PKCS11 */
-/* dispatch incoming messages */
-
+/*
+ * dispatch incoming message.
+ * returns 1 on success, 0 for incomplete messages or -1 on error.
+ */
static int
process_message(u_int socknum)
{
@@ -908,7 +910,7 @@ process_message(u_int socknum)
/* send a fail message for all other request types */
send_status(e, 0);
}
- return 0;
+ return 1;
}
switch (type) {
@@ -952,7 +954,7 @@ process_message(u_int socknum)
send_status(e, 0);
break;
}
- return 0;
+ return 1;
}
static void
@@ -1043,7 +1045,12 @@ handle_conn_read(u_int socknum)
if ((r = sshbuf_put(sockets[socknum].input, buf, len)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
explicit_bzero(buf, sizeof(buf));
- process_message(socknum);
+ for (;;) {
+ if ((r = process_message(socknum)) == -1)
+ return -1;
+ else if (r == 0)
+ break;
+ }
return 0;
}
--
2.41.0

View File

@@ -0,0 +1,125 @@
From 653cc18c922fc387b3d3aa1b081c5e5283cce28a Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Tue, 26 Jan 2021 00:47:47 +0000
Subject: [PATCH 07/12] upstream: use recallocarray to allocate the agent
sockets table;
also clear socket entries that are being marked as unused.
spinkle in some debug2() spam to make it easier to watch an agent
do its thing.
ok markus
OpenBSD-Commit-ID: 74582c8e82e96afea46f6c7b6813a429cbc75922
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/1fe16fd61bb53944ec510882acc0491abd66ff76]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-agent.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/ssh-agent.c b/ssh-agent.c
index 78f7268..2635bc5 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.264 2020/09/18 08:16:38 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.269 2021/01/26 00:47:47 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -175,11 +175,12 @@ static void
close_socket(SocketEntry *e)
{
close(e->fd);
- e->fd = -1;
- e->type = AUTH_UNUSED;
sshbuf_free(e->input);
sshbuf_free(e->output);
sshbuf_free(e->request);
+ memset(e, '\0', sizeof(*e));
+ e->fd = -1;
+ e->type = AUTH_UNUSED;
}
static void
@@ -249,6 +250,8 @@ process_request_identities(SocketEntry *e)
struct sshbuf *msg;
int r;
+ debug2("%s: entering", __func__);
+
if ((msg = sshbuf_new()) == NULL)
fatal("%s: sshbuf_new failed", __func__);
if ((r = sshbuf_put_u8(msg, SSH2_AGENT_IDENTITIES_ANSWER)) != 0 ||
@@ -441,6 +444,7 @@ process_remove_identity(SocketEntry *e)
struct sshkey *key = NULL;
Identity *id;
+ debug2("%s: entering", __func__);
if ((r = sshkey_froms(e->request, &key)) != 0) {
error("%s: get key: %s", __func__, ssh_err(r));
goto done;
@@ -467,6 +471,7 @@ process_remove_all_identities(SocketEntry *e)
{
Identity *id;
+ debug2("%s: entering", __func__);
/* Loop over all identities and clear the keys. */
for (id = TAILQ_FIRST(&idtab->idlist); id;
id = TAILQ_FIRST(&idtab->idlist)) {
@@ -520,6 +525,7 @@ process_add_identity(SocketEntry *e)
u_char ctype;
int r = SSH_ERR_INTERNAL_ERROR;
+ debug2("%s: entering", __func__);
if ((r = sshkey_private_deserialize(e->request, &k)) != 0 ||
k == NULL ||
(r = sshbuf_get_cstring(e->request, &comment, NULL)) != 0) {
@@ -667,6 +673,7 @@ process_lock_agent(SocketEntry *e, int lock)
static u_int fail_count = 0;
size_t pwlen;
+ debug2("%s: entering", __func__);
/*
* This is deliberately fatal: the user has requested that we lock,
* but we can't parse their request properly. The only safe thing to
@@ -738,6 +745,7 @@ process_add_smartcard_key(SocketEntry *e)
struct sshkey **keys = NULL, *k;
Identity *id;
+ debug2("%s: entering", __func__);
if ((r = sshbuf_get_cstring(e->request, &provider, NULL)) != 0 ||
(r = sshbuf_get_cstring(e->request, &pin, NULL)) != 0) {
error("%s: buffer error: %s", __func__, ssh_err(r));
@@ -818,6 +826,7 @@ process_remove_smartcard_key(SocketEntry *e)
int r, success = 0;
Identity *id, *nxt;
+ debug2("%s: entering", __func__);
if ((r = sshbuf_get_cstring(e->request, &provider, NULL)) != 0 ||
(r = sshbuf_get_cstring(e->request, &pin, NULL)) != 0) {
error("%s: buffer error: %s", __func__, ssh_err(r));
@@ -962,6 +971,8 @@ new_socket(sock_type type, int fd)
{
u_int i, old_alloc, new_alloc;
+ debug("%s: type = %s", __func__, type == AUTH_CONNECTION ? "CONNECTION" :
+ (type == AUTH_SOCKET ? "SOCKET" : "UNKNOWN"));
set_nonblock(fd);
if (fd > max_fd)
@@ -981,7 +992,8 @@ new_socket(sock_type type, int fd)
}
old_alloc = sockets_alloc;
new_alloc = sockets_alloc + 10;
- sockets = xreallocarray(sockets, new_alloc, sizeof(sockets[0]));
+ sockets = xrecallocarray(sockets, old_alloc, new_alloc,
+ sizeof(sockets[0]));
for (i = old_alloc; i < new_alloc; i++)
sockets[i].type = AUTH_UNUSED;
sockets_alloc = new_alloc;
--
2.41.0

View File

@@ -0,0 +1,315 @@
From c30158ea225cf8ad67c3dcc88fa9e4afbf8959a7 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Tue, 26 Jan 2021 00:53:31 +0000
Subject: [PATCH 08/12] upstream: more ssh-agent refactoring
Allow confirm_key() to accept an additional reason suffix
Factor publickey userauth parsing out into its own function and allow
it to optionally return things it parsed out of the message to its
caller.
feedback/ok markus@
OpenBSD-Commit-ID: 29006515617d1aa2d8b85cd2bf667e849146477e
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/e0e8bee8024fa9e31974244d14f03d799e5c0775]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-agent.c | 197 ++++++++++++++++++++++++++++++++++------------------
1 file changed, 130 insertions(+), 67 deletions(-)
diff --git a/ssh-agent.c b/ssh-agent.c
index 2635bc5..7ad323c 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.269 2021/01/26 00:47:47 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.270 2021/01/26 00:53:31 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -216,15 +216,16 @@ lookup_identity(struct sshkey *key)
/* Check confirmation of keysign request */
static int
-confirm_key(Identity *id)
+confirm_key(Identity *id, const char *extra)
{
char *p;
int ret = -1;
p = sshkey_fingerprint(id->key, fingerprint_hash, SSH_FP_DEFAULT);
if (p != NULL &&
- ask_permission("Allow use of key %s?\nKey fingerprint %s.",
- id->comment, p))
+ ask_permission("Allow use of key %s?\nKey fingerprint %s.%s%s",
+ id->comment, p,
+ extra == NULL ? "" : "\n", extra == NULL ? "" : extra))
ret = 0;
free(p);
@@ -290,74 +291,133 @@ agent_decode_alg(struct sshkey *key, u_int flags)
}
/*
- * This function inspects a message to be signed by a FIDO key that has a
- * web-like application string (i.e. one that does not begin with "ssh:".
- * It checks that the message is one of those expected for SSH operations
- * (pubkey userauth, sshsig, CA key signing) to exclude signing challenges
- * for the web.
+ * Attempt to parse the contents of a buffer as a SSH publickey userauth
+ * request, checking its contents for consistency and matching the embedded
+ * key against the one that is being used for signing.
+ * Note: does not modify msg buffer.
+ * Optionally extract the username and session ID from the request.
*/
static int
-check_websafe_message_contents(struct sshkey *key,
- const u_char *msg, size_t len)
+parse_userauth_request(struct sshbuf *msg, const struct sshkey *expected_key,
+ char **userp, struct sshbuf **sess_idp)
{
- int matched = 0;
- struct sshbuf *b;
- u_char m, n;
- char *cp1 = NULL, *cp2 = NULL;
+ struct sshbuf *b = NULL, *sess_id = NULL;
+ char *user = NULL, *service = NULL, *method = NULL, *pkalg = NULL;
int r;
+ u_char t, sig_follows;
struct sshkey *mkey = NULL;
- if ((b = sshbuf_from(msg, len)) == NULL)
- fatal("%s: sshbuf_new", __func__);
+ if (userp != NULL)
+ *userp = NULL;
+ if (sess_idp != NULL)
+ *sess_idp = NULL;
+ if ((b = sshbuf_fromb(msg)) == NULL)
+ fatal("%s: sshbuf_fromb", __func__);
/* SSH userauth request */
- if ((r = sshbuf_get_string_direct(b, NULL, NULL)) == 0 && /* sess_id */
- (r = sshbuf_get_u8(b, &m)) == 0 && /* SSH2_MSG_USERAUTH_REQUEST */
- (r = sshbuf_get_cstring(b, NULL, NULL)) == 0 && /* server user */
- (r = sshbuf_get_cstring(b, &cp1, NULL)) == 0 && /* service */
- (r = sshbuf_get_cstring(b, &cp2, NULL)) == 0 && /* method */
- (r = sshbuf_get_u8(b, &n)) == 0 && /* sig-follows */
- (r = sshbuf_get_cstring(b, NULL, NULL)) == 0 && /* alg */
- (r = sshkey_froms(b, &mkey)) == 0 && /* key */
- sshbuf_len(b) == 0) {
- debug("%s: parsed userauth", __func__);
- if (m == SSH2_MSG_USERAUTH_REQUEST && n == 1 &&
- strcmp(cp1, "ssh-connection") == 0 &&
- strcmp(cp2, "publickey") == 0 &&
- sshkey_equal(key, mkey)) {
- debug("%s: well formed userauth", __func__);
- matched = 1;
- }
+ if ((r = sshbuf_froms(b, &sess_id)) != 0)
+ goto out;
+ if (sshbuf_len(sess_id) == 0) {
+ r = SSH_ERR_INVALID_FORMAT;
+ goto out;
}
- free(cp1);
- free(cp2);
- sshkey_free(mkey);
+ if ((r = sshbuf_get_u8(b, &t)) != 0 || /* SSH2_MSG_USERAUTH_REQUEST */
+ (r = sshbuf_get_cstring(b, &user, NULL)) != 0 || /* server user */
+ (r = sshbuf_get_cstring(b, &service, NULL)) != 0 || /* service */
+ (r = sshbuf_get_cstring(b, &method, NULL)) != 0 || /* method */
+ (r = sshbuf_get_u8(b, &sig_follows)) != 0 || /* sig-follows */
+ (r = sshbuf_get_cstring(b, &pkalg, NULL)) != 0 || /* alg */
+ (r = sshkey_froms(b, &mkey)) != 0) /* key */
+ goto out;
+ if (t != SSH2_MSG_USERAUTH_REQUEST ||
+ sig_follows != 1 ||
+ strcmp(service, "ssh-connection") != 0 ||
+ !sshkey_equal(expected_key, mkey) ||
+ sshkey_type_from_name(pkalg) != expected_key->type) {
+ r = SSH_ERR_INVALID_FORMAT;
+ goto out;
+ }
+ if (strcmp(method, "publickey") != 0) {
+ r = SSH_ERR_INVALID_FORMAT;
+ goto out;
+ }
+ if (sshbuf_len(b) != 0) {
+ r = SSH_ERR_INVALID_FORMAT;
+ goto out;
+ }
+ /* success */
+ r = 0;
+ debug("%s: well formed userauth", __func__);
+ if (userp != NULL) {
+ *userp = user;
+ user = NULL;
+ }
+ if (sess_idp != NULL) {
+ *sess_idp = sess_id;
+ sess_id = NULL;
+ }
+ out:
sshbuf_free(b);
- if (matched)
- return 1;
+ sshbuf_free(sess_id);
+ free(user);
+ free(service);
+ free(method);
+ free(pkalg);
+ sshkey_free(mkey);
+ return r;
+}
- if ((b = sshbuf_from(msg, len)) == NULL)
- fatal("%s: sshbuf_new", __func__);
- cp1 = cp2 = NULL;
- mkey = NULL;
-
- /* SSHSIG */
- if ((r = sshbuf_cmp(b, 0, "SSHSIG", 6)) == 0 &&
- (r = sshbuf_consume(b, 6)) == 0 &&
- (r = sshbuf_get_cstring(b, NULL, NULL)) == 0 && /* namespace */
- (r = sshbuf_get_string_direct(b, NULL, NULL)) == 0 && /* reserved */
- (r = sshbuf_get_cstring(b, NULL, NULL)) == 0 && /* hashalg */
- (r = sshbuf_get_string_direct(b, NULL, NULL)) == 0 && /* H(msg) */
- sshbuf_len(b) == 0) {
- debug("%s: parsed sshsig", __func__);
- matched = 1;
- }
+/*
+ * Attempt to parse the contents of a buffer as a SSHSIG signature request.
+ * Note: does not modify buffer.
+ */
+static int
+parse_sshsig_request(struct sshbuf *msg)
+{
+ int r;
+ struct sshbuf *b;
+ if ((b = sshbuf_fromb(msg)) == NULL)
+ fatal("%s: sshbuf_fromb", __func__);
+
+ if ((r = sshbuf_cmp(b, 0, "SSHSIG", 6)) != 0 ||
+ (r = sshbuf_consume(b, 6)) != 0 ||
+ (r = sshbuf_get_cstring(b, NULL, NULL)) != 0 || /* namespace */
+ (r = sshbuf_get_string_direct(b, NULL, NULL)) != 0 || /* reserved */
+ (r = sshbuf_get_cstring(b, NULL, NULL)) != 0 || /* hashalg */
+ (r = sshbuf_get_string_direct(b, NULL, NULL)) != 0) /* H(msg) */
+ goto out;
+ if (sshbuf_len(b) != 0) {
+ r = SSH_ERR_INVALID_FORMAT;
+ goto out;
+ }
+ /* success */
+ r = 0;
+ out:
sshbuf_free(b);
- if (matched)
+ return r;
+}
+
+/*
+ * This function inspects a message to be signed by a FIDO key that has a
+ * web-like application string (i.e. one that does not begin with "ssh:".
+ * It checks that the message is one of those expected for SSH operations
+ * (pubkey userauth, sshsig, CA key signing) to exclude signing challenges
+ * for the web.
+ */
+static int
+check_websafe_message_contents(struct sshkey *key, struct sshbuf *data)
+{
+ if (parse_userauth_request(data, key, NULL, NULL) == 0) {
+ debug("%s: signed data matches public key userauth request", __func__);
return 1;
+ }
+ if (parse_sshsig_request(data) == 0) {
+ debug("%s: signed data matches SSHSIG signature request", __func__);
+ return 1;
+ }
- /* XXX CA signature operation */
+ /* XXX check CA signature operation */
error("web-origin key attempting to sign non-SSH message");
return 0;
@@ -367,21 +427,22 @@ check_websafe_message_contents(struct sshkey *key,
static void
process_sign_request2(SocketEntry *e)
{
- const u_char *data;
u_char *signature = NULL;
- size_t dlen, slen = 0;
+ size_t i, slen = 0;
u_int compat = 0, flags;
int r, ok = -1;
char *fp = NULL;
- struct sshbuf *msg;
+ struct sshbuf *msg = NULL, *data = NULL;
struct sshkey *key = NULL;
struct identity *id;
struct notifier_ctx *notifier = NULL;
- if ((msg = sshbuf_new()) == NULL)
+ debug("%s: entering", __func__);
+
+ if ((msg = sshbuf_new()) == NULL | (data = sshbuf_new()) == NULL)
fatal("%s: sshbuf_new failed", __func__);
if ((r = sshkey_froms(e->request, &key)) != 0 ||
- (r = sshbuf_get_string_direct(e->request, &data, &dlen)) != 0 ||
+ (r = sshbuf_get_stringb(e->request, data)) != 0 ||
(r = sshbuf_get_u32(e->request, &flags)) != 0) {
error("%s: couldn't parse request: %s", __func__, ssh_err(r));
goto send;
@@ -391,13 +452,13 @@ process_sign_request2(SocketEntry *e)
verbose("%s: %s key not found", __func__, sshkey_type(key));
goto send;
}
- if (id->confirm && confirm_key(id) != 0) {
+ if (id->confirm && confirm_key(id, NULL) != 0) {
verbose("%s: user refused key", __func__);
goto send;
}
if (sshkey_is_sk(id->key)) {
if (strncmp(id->key->sk_application, "ssh:", 4) != 0 &&
- !check_websafe_message_contents(key, data, dlen)) {
+ !check_websafe_message_contents(key, data)) {
/* error already logged */
goto send;
}
@@ -411,7 +472,7 @@ process_sign_request2(SocketEntry *e)
}
}
if ((r = sshkey_sign(id->key, &signature, &slen,
- data, dlen, agent_decode_alg(key, flags),
+ sshbuf_ptr(data), sshbuf_len(data), agent_decode_alg(key, flags),
id->sk_provider, compat)) != 0) {
error("%s: sshkey_sign: %s", __func__, ssh_err(r));
goto send;
@@ -420,8 +481,7 @@ process_sign_request2(SocketEntry *e)
ok = 0;
send:
notify_complete(notifier);
- sshkey_free(key);
- free(fp);
+
if (ok == 0) {
if ((r = sshbuf_put_u8(msg, SSH2_AGENT_SIGN_RESPONSE)) != 0 ||
(r = sshbuf_put_string(msg, signature, slen)) != 0)
@@ -432,7 +492,10 @@ process_sign_request2(SocketEntry *e)
if ((r = sshbuf_put_stringb(e->output, msg)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
+ sshbuf_free(data);
sshbuf_free(msg);
+ sshkey_free(key);
+ free(fp);
free(signature);
}
--
2.41.0

View File

@@ -0,0 +1,38 @@
From 7adba46611e5d076d7d12d9f4162dd4cabd5ff50 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Fri, 29 Jan 2021 06:28:10 +0000
Subject: [PATCH 09/12] upstream: give typedef'd struct a struct name; makes
the fuzzer I'm
writing a bit easier
OpenBSD-Commit-ID: 1052ab521505a4d8384d67acb3974ef81b8896cb
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/8afaa7d7918419d3da6c0477b83db2159879cb33]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-agent.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ssh-agent.c b/ssh-agent.c
index 7ad323c..c99927c 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.270 2021/01/26 00:53:31 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.274 2021/01/29 06:28:10 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -108,7 +108,7 @@ typedef enum {
AUTH_CONNECTION
} sock_type;
-typedef struct {
+typedef struct socket_entry {
int fd;
sock_type type;
struct sshbuf *input;
--
2.41.0

View File

@@ -0,0 +1,39 @@
From 343e2a2c0ef754a7a86118016b248f7a73f8d510 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Fri, 29 Jan 2021 06:29:46 +0000
Subject: [PATCH 10/12] upstream: fix the values of enum sock_type
OpenBSD-Commit-ID: 18d048f4dbfbb159ff500cfc2700b8fb1407facd
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/1a4b92758690faa12f49079dd3b72567f909466d]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-agent.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ssh-agent.c b/ssh-agent.c
index c99927c..7f1e14b 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.274 2021/01/29 06:28:10 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.275 2021/01/29 06:29:46 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -103,9 +103,9 @@
#define AGENT_RBUF_LEN (4096)
typedef enum {
- AUTH_UNUSED,
- AUTH_SOCKET,
- AUTH_CONNECTION
+ AUTH_UNUSED = 0,
+ AUTH_SOCKET = 1,
+ AUTH_CONNECTION = 2,
} sock_type;
typedef struct socket_entry {
--
2.41.0

View File

@@ -0,0 +1,307 @@
From 2b3b369c8cf71f9ef5942a5e074e6f86e7ca1e0c Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Sun, 19 Dec 2021 22:09:23 +0000
Subject: [PATCH 11/12] upstream: ssh-agent side of binding
record session ID/hostkey/forwarding status for each active socket.
Attempt to parse data-to-be-signed at signature request time and extract
session ID from the blob if it is a pubkey userauth request.
ok markus@
OpenBSD-Commit-ID: a80fd41e292b18b67508362129e9fed549abd318
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/4c1e3ce85e183a9d0c955c88589fed18e4d6a058]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
authfd.h | 3 +
ssh-agent.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++---
2 files changed, 170 insertions(+), 8 deletions(-)
diff --git a/authfd.h b/authfd.h
index c3bf625..9cc9807 100644
--- a/authfd.h
+++ b/authfd.h
@@ -76,6 +76,9 @@ int ssh_agent_sign(int sock, const struct sshkey *key,
#define SSH2_AGENTC_ADD_ID_CONSTRAINED 25
#define SSH_AGENTC_ADD_SMARTCARD_KEY_CONSTRAINED 26
+/* generic extension mechanism */
+#define SSH_AGENTC_EXTENSION 27
+
#define SSH_AGENT_CONSTRAIN_LIFETIME 1
#define SSH_AGENT_CONSTRAIN_CONFIRM 2
#define SSH_AGENT_CONSTRAIN_MAXSIGN 3
diff --git a/ssh-agent.c b/ssh-agent.c
index 7f1e14b..01c7f2b 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.275 2021/01/29 06:29:46 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.280 2021/12/19 22:09:23 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -98,9 +98,15 @@
#endif
/* Maximum accepted message length */
-#define AGENT_MAX_LEN (256*1024)
+#define AGENT_MAX_LEN (256*1024)
/* Maximum bytes to read from client socket */
-#define AGENT_RBUF_LEN (4096)
+#define AGENT_RBUF_LEN (4096)
+/* Maximum number of recorded session IDs/hostkeys per connection */
+#define AGENT_MAX_SESSION_IDS 16
+/* Maximum size of session ID */
+#define AGENT_MAX_SID_LEN 128
+
+/* XXX store hostkey_sid in a refcounted tree */
typedef enum {
AUTH_UNUSED = 0,
@@ -108,12 +114,20 @@ typedef enum {
AUTH_CONNECTION = 2,
} sock_type;
+struct hostkey_sid {
+ struct sshkey *key;
+ struct sshbuf *sid;
+ int forwarded;
+};
+
typedef struct socket_entry {
int fd;
sock_type type;
struct sshbuf *input;
struct sshbuf *output;
struct sshbuf *request;
+ size_t nsession_ids;
+ struct hostkey_sid *session_ids;
} SocketEntry;
u_int sockets_alloc = 0;
@@ -174,10 +188,17 @@ static int restrict_websafe = 1;
static void
close_socket(SocketEntry *e)
{
+ size_t i;
+
close(e->fd);
sshbuf_free(e->input);
sshbuf_free(e->output);
sshbuf_free(e->request);
+ for (i = 0; i < e->nsession_ids; i++) {
+ sshkey_free(e->session_ids[i].key);
+ sshbuf_free(e->session_ids[i].sid);
+ }
+ free(e->session_ids);
memset(e, '\0', sizeof(*e));
e->fd = -1;
e->type = AUTH_UNUSED;
@@ -423,6 +444,18 @@ check_websafe_message_contents(struct sshkey *key, struct sshbuf *data)
return 0;
}
+static int
+buf_equal(const struct sshbuf *a, const struct sshbuf *b)
+{
+ if (sshbuf_ptr(a) == NULL || sshbuf_ptr(b) == NULL)
+ return SSH_ERR_INVALID_ARGUMENT;
+ if (sshbuf_len(a) != sshbuf_len(b))
+ return SSH_ERR_INVALID_FORMAT;
+ if (timingsafe_bcmp(sshbuf_ptr(a), sshbuf_ptr(b), sshbuf_len(a)) != 0)
+ return SSH_ERR_INVALID_FORMAT;
+ return 0;
+}
+
/* ssh2 only */
static void
process_sign_request2(SocketEntry *e)
@@ -431,8 +464,8 @@ process_sign_request2(SocketEntry *e)
size_t i, slen = 0;
u_int compat = 0, flags;
int r, ok = -1;
- char *fp = NULL;
- struct sshbuf *msg = NULL, *data = NULL;
+ char *fp = NULL, *user = NULL, *sig_dest = NULL;
+ struct sshbuf *msg = NULL, *data = NULL, *sid = NULL;
struct sshkey *key = NULL;
struct identity *id;
struct notifier_ctx *notifier = NULL;
@@ -452,7 +485,33 @@ process_sign_request2(SocketEntry *e)
verbose("%s: %s key not found", __func__, sshkey_type(key));
goto send;
}
- if (id->confirm && confirm_key(id, NULL) != 0) {
+ /*
+ * If session IDs were recorded for this socket, then use them to
+ * annotate the confirmation messages with the host keys.
+ */
+ if (e->nsession_ids > 0 &&
+ parse_userauth_request(data, key, &user, &sid) == 0) {
+ /*
+ * session ID from userauth request should match the final
+ * ID in the list recorded in the socket, unless the ssh
+ * client at that point lacks the binding extension (or if
+ * an attacker is trying to steal use of the agent).
+ */
+ i = e->nsession_ids - 1;
+ if (buf_equal(sid, e->session_ids[i].sid) == 0) {
+ if ((fp = sshkey_fingerprint(e->session_ids[i].key,
+ SSH_FP_HASH_DEFAULT, SSH_FP_DEFAULT)) == NULL)
+ fatal("%s: fingerprint failed", __func__);
+ debug3("%s: destination %s %s (slot %zu)", __func__,
+ sshkey_type(e->session_ids[i].key), fp, i);
+ xasprintf(&sig_dest, "public key request for "
+ "target user \"%s\" to %s %s", user,
+ sshkey_type(e->session_ids[i].key), fp);
+ free(fp);
+ fp = NULL;
+ }
+ }//
+ if (id->confirm && confirm_key(id, sig_dest) != 0) {
verbose("%s: user refused key", __func__);
goto send;
}
@@ -467,8 +526,10 @@ process_sign_request2(SocketEntry *e)
SSH_FP_DEFAULT)) == NULL)
fatal("%s: fingerprint failed", __func__);
notifier = notify_start(0,
- "Confirm user presence for key %s %s",
- sshkey_type(id->key), fp);
+ "Confirm user presence for key %s %s%s%s",
+ sshkey_type(id->key), fp,
+ sig_dest == NULL ? "" : "\n",
+ sig_dest == NULL ? "" : sig_dest);
}
}
if ((r = sshkey_sign(id->key, &signature, &slen,
@@ -492,11 +553,14 @@ process_sign_request2(SocketEntry *e)
if ((r = sshbuf_put_stringb(e->output, msg)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
+ sshbuf_free(sid);
sshbuf_free(data);
sshbuf_free(msg);
sshkey_free(key);
free(fp);
free(signature);
+ free(sig_dest);
+ free(user);
}
/* shared */
@@ -925,6 +989,98 @@ send:
}
#endif /* ENABLE_PKCS11 */
+static int
+process_ext_session_bind(SocketEntry *e)
+{
+ int r, sid_match, key_match;
+ struct sshkey *key = NULL;
+ struct sshbuf *sid = NULL, *sig = NULL;
+ char *fp = NULL;
+ u_char fwd;
+ size_t i;
+
+ debug2("%s: entering", __func__);
+ if ((r = sshkey_froms(e->request, &key)) != 0 ||
+ (r = sshbuf_froms(e->request, &sid)) != 0 ||
+ (r = sshbuf_froms(e->request, &sig)) != 0 ||
+ (r = sshbuf_get_u8(e->request, &fwd)) != 0) {
+ error("%s: parse: %s", __func__, ssh_err(r));
+ goto out;
+ }
+ if ((fp = sshkey_fingerprint(key, SSH_FP_HASH_DEFAULT,
+ SSH_FP_DEFAULT)) == NULL)
+ fatal("%s: fingerprint failed", __func__);
+ /* check signature with hostkey on session ID */
+ if ((r = sshkey_verify(key, sshbuf_ptr(sig), sshbuf_len(sig),
+ sshbuf_ptr(sid), sshbuf_len(sid), NULL, 0, NULL)) != 0) {
+ error("%s: sshkey_verify for %s %s: %s", __func__, sshkey_type(key), fp, ssh_err(r));
+ goto out;
+ }
+ /* check whether sid/key already recorded */
+ for (i = 0; i < e->nsession_ids; i++) {
+ sid_match = buf_equal(sid, e->session_ids[i].sid) == 0;
+ key_match = sshkey_equal(key, e->session_ids[i].key);
+ if (sid_match && key_match) {
+ debug("%s: session ID already recorded for %s %s", __func__,
+ sshkey_type(key), fp);
+ r = 0;
+ goto out;
+ } else if (sid_match) {
+ error("%s: session ID recorded against different key "
+ "for %s %s", __func__, sshkey_type(key), fp);
+ r = -1;
+ goto out;
+ }
+ /*
+ * new sid with previously-seen key can happen, e.g. multiple
+ * connections to the same host.
+ */
+ }
+ /* record new key/sid */
+ if (e->nsession_ids >= AGENT_MAX_SESSION_IDS) {
+ error("%s: too many session IDs recorded", __func__);
+ goto out;
+ }
+ e->session_ids = xrecallocarray(e->session_ids, e->nsession_ids,
+ e->nsession_ids + 1, sizeof(*e->session_ids));
+ i = e->nsession_ids++;
+ debug("%s: recorded %s %s (slot %zu of %d)", __func__, sshkey_type(key), fp, i,
+ AGENT_MAX_SESSION_IDS);
+ e->session_ids[i].key = key;
+ e->session_ids[i].forwarded = fwd != 0;
+ key = NULL; /* transferred */
+ /* can't transfer sid; it's refcounted and scoped to request's life */
+ if ((e->session_ids[i].sid = sshbuf_new()) == NULL)
+ fatal("%s: sshbuf_new", __func__);
+ if ((r = sshbuf_putb(e->session_ids[i].sid, sid)) != 0)
+ fatal("%s: sshbuf_putb session ID: %s", __func__, ssh_err(r));
+ /* success */
+ r = 0;
+ out:
+ sshkey_free(key);
+ sshbuf_free(sid);
+ sshbuf_free(sig);
+ return r == 0 ? 1 : 0;
+}
+
+static void
+process_extension(SocketEntry *e)
+{
+ int r, success = 0;
+ char *name;
+
+ debug2("%s: entering", __func__);
+ if ((r = sshbuf_get_cstring(e->request, &name, NULL)) != 0) {
+ error("%s: parse: %s", __func__, ssh_err(r));
+ goto send;
+ }
+ if (strcmp(name, "session-bind@openssh.com") == 0)
+ success = process_ext_session_bind(e);
+ else
+ debug("%s: unsupported extension \"%s\"", __func__, name);
+send:
+ send_status(e, success);
+}
/*
* dispatch incoming message.
* returns 1 on success, 0 for incomplete messages or -1 on error.
@@ -1019,6 +1175,9 @@ process_message(u_int socknum)
process_remove_smartcard_key(e);
break;
#endif /* ENABLE_PKCS11 */
+ case SSH_AGENTC_EXTENSION:
+ process_extension(e);
+ break;
default:
/* Unknown message. Respond with failure. */
error("Unknown message %d", type);
--
2.41.0

View File

@@ -0,0 +1,120 @@
From 4fe3d0fbd3d6dc1f19354e0d73a3231c461ed044 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Wed, 19 Jul 2023 13:56:33 +0000
Subject: [PATCH 12/12] upstream: Disallow remote addition of FIDO/PKCS11
provider libraries to ssh-agent by default.
The old behaviour of allowing remote clients from loading providers
can be restored using `ssh-agent -O allow-remote-pkcs11`.
Detection of local/remote clients requires a ssh(1) that supports
the `session-bind@openssh.com` extension. Forwarding access to a
ssh-agent socket using non-OpenSSH tools may circumvent this control.
ok markus@
OpenBSD-Commit-ID: 4c2bdf79b214ae7e60cc8c39a45501344fa7bd7c
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/1f2731f5d7a8f8a8385c6031667ed29072c0d92a]
CVE: CVE-2023-38408
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
---
ssh-agent.1 | 20 ++++++++++++++++++++
ssh-agent.c | 26 ++++++++++++++++++++++++--
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/ssh-agent.1 b/ssh-agent.1
index fff0db6..a0f1e21 100644
--- a/ssh-agent.1
+++ b/ssh-agent.1
@@ -97,6 +97,26 @@ The default is
Kill the current agent (given by the
.Ev SSH_AGENT_PID
environment variable).
+Currently two options are supported:
+.Cm allow-remote-pkcs11
+and
+.Pp
+The
+.Cm allow-remote-pkcs11
+option allows clients of a forwarded
+.Nm
+to load PKCS#11 or FIDO provider libraries.
+By default only local clients may perform this operation.
+Note that signalling that a
+.Nm
+client remote is performed by
+.Xr ssh 1 ,
+and use of other tools to forward access to the agent socket may circumvent
+this restriction.
+.Pp
+The
+.Cm no-restrict-websafe ,
+instructs
.It Fl P Ar provider_whitelist
Specify a pattern-list of acceptable paths for PKCS#11 and FIDO authenticator
shared libraries that may be used with the
diff --git a/ssh-agent.c b/ssh-agent.c
index 01c7f2b..40c1b6b 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.280 2021/12/19 22:09:23 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.300 2023/07/19 13:56:33 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -167,6 +167,12 @@ char socket_dir[PATH_MAX];
/* PKCS#11/Security key path whitelist */
static char *provider_whitelist;
+/*
+ * Allows PKCS11 providers or SK keys that use non-internal providers to
+ * be added over a remote connection (identified by session-bind@openssh.com).
+ */
+static int remote_add_provider;
+
/* locking */
#define LOCK_SIZE 32
#define LOCK_SALT_SIZE 16
@@ -736,6 +742,15 @@ process_add_identity(SocketEntry *e)
if (strcasecmp(sk_provider, "internal") == 0) {
debug("%s: internal provider", __func__);
} else {
+ if (e->nsession_ids != 0 && !remote_add_provider) {
+ verbose("failed add of SK provider \"%.100s\": "
+ "remote addition of providers is disabled",
+ sk_provider);
+ free(sk_provider);
+ free(comment);
+ sshkey_free(k);
+ goto send;
+ }
if (realpath(sk_provider, canonical_provider) == NULL) {
verbose("failed provider \"%.100s\": "
"realpath: %s", sk_provider,
@@ -901,6 +916,11 @@ process_add_smartcard_key(SocketEntry *e)
goto send;
}
}
+ if (e->nsession_ids != 0 && !remote_add_provider) {
+ verbose("failed PKCS#11 add of \"%.100s\": remote addition of "
+ "providers is disabled", provider);
+ goto send;
+ }
if (realpath(provider, canonical_provider) == NULL) {
verbose("failed PKCS#11 add of \"%.100s\": realpath: %s",
provider, strerror(errno));
@@ -1556,7 +1576,9 @@ main(int ac, char **av)
break;
case 'O':
if (strcmp(optarg, "no-restrict-websafe") == 0)
- restrict_websafe = 0;
+ restrict_websafe = 0;
+ else if (strcmp(optarg, "allow-remote-pkcs11") == 0)
+ remote_add_provider = 1;
else
fatal("Unknown -O option");
break;
--
2.41.0

View File

@@ -0,0 +1,468 @@
(modified to not remove ssh_packet_read_expect(), to add to
KexAlgorithms in sshd.c and sshconnect2.c as this version pre-dates
kex_proposal_populate_entries(), replace debug*_f() with debug*(),
error*_f() with error*(), and fatal_f() with fatal())
Backport of:
From 1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Mon, 18 Dec 2023 14:45:17 +0000
Subject: [PATCH] upstream: implement "strict key exchange" in ssh and sshd
This adds a protocol extension to improve the integrity of the SSH
transport protocol, particular in and around the initial key exchange
(KEX) phase.
Full details of the extension are in the PROTOCOL file.
with markus@
OpenBSD-Commit-ID: 2a66ac962f0a630d7945fee54004ed9e9c439f14
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/openssh/tree/debian/patches/CVE-2023-48795.patch?h=ubuntu/focal-security
Upstream commit https://github.com/openssh/openssh-portable/commit/1edb00c58f8a6875fad6a497aa2bacf37f9e6cd5]
CVE: CVE-2023-48795
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
PROTOCOL | 26 +++++++++++++++++
kex.c | 68 +++++++++++++++++++++++++++++++++-----------
kex.h | 1 +
packet.c | 78 ++++++++++++++++++++++++++++++++++++++-------------
sshconnect2.c | 14 +++------
sshd.c | 7 +++--
6 files changed, 146 insertions(+), 48 deletions(-)
diff --git a/PROTOCOL b/PROTOCOL
index f75c1c0..89bddfe 100644
--- a/PROTOCOL
+++ b/PROTOCOL
@@ -102,6 +102,32 @@ OpenSSH supports the use of ECDH in Curve25519 for key exchange as
described at:
http://git.libssh.org/users/aris/libssh.git/plain/doc/curve25519-sha256@libssh.org.txt?h=curve25519
+1.9 transport: strict key exchange extension
+
+OpenSSH supports a number of transport-layer hardening measures under
+a "strict KEX" feature. This feature is signalled similarly to the
+RFC8308 ext-info feature: by including a additional algorithm in the
+initiial SSH2_MSG_KEXINIT kex_algorithms field. The client may append
+"kex-strict-c-v00@openssh.com" to its kex_algorithms and the server
+may append "kex-strict-s-v00@openssh.com". These pseudo-algorithms
+are only valid in the initial SSH2_MSG_KEXINIT and MUST be ignored
+if they are present in subsequent SSH2_MSG_KEXINIT packets.
+
+When an endpoint that supports this extension observes this algorithm
+name in a peer's KEXINIT packet, it MUST make the following changes to
+the the protocol:
+
+a) During initial KEX, terminate the connection if any unexpected or
+ out-of-sequence packet is received. This includes terminating the
+ connection if the first packet received is not SSH2_MSG_KEXINIT.
+ Unexpected packets for the purpose of strict KEX include messages
+ that are otherwise valid at any time during the connection such as
+ SSH2_MSG_DEBUG and SSH2_MSG_IGNORE.
+b) After sending or receiving a SSH2_MSG_NEWKEYS message, reset the
+ packet sequence number to zero. This behaviour persists for the
+ duration of the connection (i.e. not just the first
+ SSH2_MSG_NEWKEYS).
+
2. Connection protocol changes
2.1. connection: Channel write close extension "eow@openssh.com"
diff --git a/kex.c b/kex.c
index ce85f04..3129a4e 100644
--- a/kex.c
+++ b/kex.c
@@ -63,7 +63,7 @@
#include "digest.h"
/* prototype */
-static int kex_choose_conf(struct ssh *);
+static int kex_choose_conf(struct ssh *, uint32_t seq);
static int kex_input_newkeys(int, u_int32_t, struct ssh *);
static const char *proposal_names[PROPOSAL_MAX] = {
@@ -173,6 +173,18 @@ kex_names_valid(const char *names)
return 1;
}
+/* returns non-zero if proposal contains any algorithm from algs */
+static int
+has_any_alg(const char *proposal, const char *algs)
+{
+ char *cp;
+
+ if ((cp = match_list(proposal, algs, NULL)) == NULL)
+ return 0;
+ free(cp);
+ return 1;
+}
+
/*
* Concatenate algorithm names, avoiding duplicates in the process.
* Caller must free returned string.
@@ -180,7 +192,7 @@ kex_names_valid(const char *names)
char *
kex_names_cat(const char *a, const char *b)
{
- char *ret = NULL, *tmp = NULL, *cp, *p, *m;
+ char *ret = NULL, *tmp = NULL, *cp, *p;
size_t len;
if (a == NULL || *a == '\0')
@@ -197,10 +209,8 @@ kex_names_cat(const char *a, const char *b)
}
strlcpy(ret, a, len);
for ((p = strsep(&cp, ",")); p && *p != '\0'; (p = strsep(&cp, ","))) {
- if ((m = match_list(ret, p, NULL)) != NULL) {
- free(m);
+ if (has_any_alg(ret, p))
continue; /* Algorithm already present */
- }
if (strlcat(ret, ",", len) >= len ||
strlcat(ret, p, len) >= len) {
free(tmp);
@@ -409,7 +419,12 @@ kex_protocol_error(int type, u_int32_t seq, struct ssh *ssh)
{
int r;
- error("kex protocol error: type %d seq %u", type, seq);
+ /* If in strict mode, any unexpected message is an error */
+ if ((ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict) {
+ ssh_packet_disconnect(ssh, "strict KEX violation: "
+ "unexpected packet type %u (seqnr %u)", type, seq);
+ }
+ error("type %u seq %u", type, seq);
if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 ||
(r = sshpkt_put_u32(ssh, seq)) != 0 ||
(r = sshpkt_send(ssh)) != 0)
@@ -481,6 +496,11 @@ kex_input_ext_info(int type, u_int32_t seq, struct ssh *ssh)
ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &kex_protocol_error);
if ((r = sshpkt_get_u32(ssh, &ninfo)) != 0)
return r;
+ if (ninfo >= 1024) {
+ error("SSH2_MSG_EXT_INFO with too many entries, expected "
+ "<=1024, received %u", ninfo);
+ return dispatch_protocol_error(type, seq, ssh);
+ }
for (i = 0; i < ninfo; i++) {
if ((r = sshpkt_get_cstring(ssh, &name, NULL)) != 0)
return r;
@@ -581,7 +601,7 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh)
error("%s: no hex", __func__);
return SSH_ERR_INTERNAL_ERROR;
}
- ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, NULL);
+ ssh_dispatch_set(ssh, SSH2_MSG_KEXINIT, &kex_protocol_error);
ptr = sshpkt_ptr(ssh, &dlen);
if ((r = sshbuf_put(kex->peer, ptr, dlen)) != 0)
return r;
@@ -617,7 +637,7 @@ kex_input_kexinit(int type, u_int32_t seq, struct ssh *ssh)
if (!(kex->flags & KEX_INIT_SENT))
if ((r = kex_send_kexinit(ssh)) != 0)
return r;
- if ((r = kex_choose_conf(ssh)) != 0)
+ if ((r = kex_choose_conf(ssh, seq)) != 0)
return r;
if (kex->kex_type < KEX_MAX && kex->kex[kex->kex_type] != NULL)
@@ -880,7 +900,13 @@ proposals_match(char *my[PROPOSAL_MAX], char *peer[PROPOSAL_MAX])
}
static int
-kex_choose_conf(struct ssh *ssh)
+kexalgs_contains(char **peer, const char *ext)
+{
+ return has_any_alg(peer[PROPOSAL_KEX_ALGS], ext);
+}
+
+static int
+kex_choose_conf(struct ssh *ssh, uint32_t seq)
{
struct kex *kex = ssh->kex;
struct newkeys *newkeys;
@@ -905,13 +931,23 @@ kex_choose_conf(struct ssh *ssh)
sprop=peer;
}
- /* Check whether client supports ext_info_c */
- if (kex->server && (kex->flags & KEX_INITIAL)) {
- char *ext;
-
- ext = match_list("ext-info-c", peer[PROPOSAL_KEX_ALGS], NULL);
- kex->ext_info_c = (ext != NULL);
- free(ext);
+ /* Check whether peer supports ext_info/kex_strict */
+ if ((kex->flags & KEX_INITIAL) != 0) {
+ if (kex->server) {
+ kex->ext_info_c = kexalgs_contains(peer, "ext-info-c");
+ kex->kex_strict = kexalgs_contains(peer,
+ "kex-strict-c-v00@openssh.com");
+ } else {
+ kex->kex_strict = kexalgs_contains(peer,
+ "kex-strict-s-v00@openssh.com");
+ }
+ if (kex->kex_strict) {
+ debug3("will use strict KEX ordering");
+ if (seq != 0)
+ ssh_packet_disconnect(ssh,
+ "strict KEX violation: "
+ "KEXINIT was not the first packet");
+ }
}
/* Algorithm Negotiation */
diff --git a/kex.h b/kex.h
index a5ae6ac..cae38f7 100644
--- a/kex.h
+++ b/kex.h
@@ -145,6 +145,7 @@ struct kex {
u_int kex_type;
char *server_sig_algs;
int ext_info_c;
+ int kex_strict;
struct sshbuf *my;
struct sshbuf *peer;
struct sshbuf *client_version;
diff --git a/packet.c b/packet.c
index 6d3e917..43139f9 100644
--- a/packet.c
+++ b/packet.c
@@ -1203,8 +1203,13 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
sshbuf_dump(state->output, stderr);
#endif
/* increment sequence number for outgoing packets */
- if (++state->p_send.seqnr == 0)
+ if (++state->p_send.seqnr == 0) {
+ if ((ssh->kex->flags & KEX_INITIAL) != 0) {
+ ssh_packet_disconnect(ssh, "outgoing sequence number "
+ "wrapped during initial key exchange");
+ }
logit("outgoing seqnr wraps around");
+ }
if (++state->p_send.packets == 0)
if (!(ssh->compat & SSH_BUG_NOREKEY))
return SSH_ERR_NEED_REKEY;
@@ -1212,6 +1217,11 @@ ssh_packet_send2_wrapped(struct ssh *ssh)
state->p_send.bytes += len;
sshbuf_reset(state->outgoing_packet);
+ if (type == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
+ debug("resetting send seqnr %u", state->p_send.seqnr);
+ state->p_send.seqnr = 0;
+ }
+
if (type == SSH2_MSG_NEWKEYS)
r = ssh_set_newkeys(ssh, MODE_OUT);
else if (type == SSH2_MSG_USERAUTH_SUCCESS && state->server_side)
@@ -1345,8 +1355,7 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
/* Stay in the loop until we have received a complete packet. */
for (;;) {
/* Try to read a packet from the buffer. */
- r = ssh_packet_read_poll_seqnr(ssh, typep, seqnr_p);
- if (r != 0)
+ if ((r = ssh_packet_read_poll_seqnr(ssh, typep, seqnr_p)) != 0)
break;
/* If we got a packet, return it. */
if (*typep != SSH_MSG_NONE)
@@ -1633,10 +1642,16 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
if ((r = sshbuf_consume(state->input, mac->mac_len)) != 0)
goto out;
}
+
if (seqnr_p != NULL)
*seqnr_p = state->p_read.seqnr;
- if (++state->p_read.seqnr == 0)
+ if (++state->p_read.seqnr == 0) {
+ if ((ssh->kex->flags & KEX_INITIAL) != 0) {
+ ssh_packet_disconnect(ssh, "incoming sequence number "
+ "wrapped during initial key exchange");
+ }
logit("incoming seqnr wraps around");
+ }
if (++state->p_read.packets == 0)
if (!(ssh->compat & SSH_BUG_NOREKEY))
return SSH_ERR_NEED_REKEY;
@@ -1702,6 +1717,10 @@ ssh_packet_read_poll2(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
#endif
/* reset for next packet */
state->packlen = 0;
+ if (*typep == SSH2_MSG_NEWKEYS && ssh->kex->kex_strict) {
+ debug("resetting read seqnr %u", state->p_read.seqnr);
+ state->p_read.seqnr = 0;
+ }
/* do we need to rekey? */
if (ssh_packet_need_rekeying(ssh, 0)) {
@@ -1726,10 +1745,39 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
r = ssh_packet_read_poll2(ssh, typep, seqnr_p);
if (r != 0)
return r;
- if (*typep) {
- state->keep_alive_timeouts = 0;
- DBG(debug("received packet type %d", *typep));
+ if (*typep == 0) {
+ /* no message ready */
+ return 0;
+ }
+ state->keep_alive_timeouts = 0;
+ DBG(debug("received packet type %d", *typep));
+
+ /* Always process disconnect messages */
+ if (*typep == SSH2_MSG_DISCONNECT) {
+ if ((r = sshpkt_get_u32(ssh, &reason)) != 0 ||
+ (r = sshpkt_get_string(ssh, &msg, NULL)) != 0)
+ return r;
+ /* Ignore normal client exit notifications */
+ do_log2(ssh->state->server_side &&
+ reason == SSH2_DISCONNECT_BY_APPLICATION ?
+ SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
+ "Received disconnect from %s port %d:"
+ "%u: %.400s", ssh_remote_ipaddr(ssh),
+ ssh_remote_port(ssh), reason, msg);
+ free(msg);
+ return SSH_ERR_DISCONNECTED;
}
+
+ /*
+ * Do not implicitly handle any messages here during initial
+ * KEX when in strict mode. They will be need to be allowed
+ * explicitly by the KEX dispatch table or they will generate
+ * protocol errors.
+ */
+ if (ssh->kex != NULL &&
+ (ssh->kex->flags & KEX_INITIAL) && ssh->kex->kex_strict)
+ return 0;
+ /* Implicitly handle transport-level messages */
switch (*typep) {
case SSH2_MSG_IGNORE:
debug3("Received SSH2_MSG_IGNORE");
@@ -1744,19 +1792,6 @@ ssh_packet_read_poll_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
debug("Remote: %.900s", msg);
free(msg);
break;
- case SSH2_MSG_DISCONNECT:
- if ((r = sshpkt_get_u32(ssh, &reason)) != 0 ||
- (r = sshpkt_get_string(ssh, &msg, NULL)) != 0)
- return r;
- /* Ignore normal client exit notifications */
- do_log2(ssh->state->server_side &&
- reason == SSH2_DISCONNECT_BY_APPLICATION ?
- SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
- "Received disconnect from %s port %d:"
- "%u: %.400s", ssh_remote_ipaddr(ssh),
- ssh_remote_port(ssh), reason, msg);
- free(msg);
- return SSH_ERR_DISCONNECTED;
case SSH2_MSG_UNIMPLEMENTED:
if ((r = sshpkt_get_u32(ssh, &seqnr)) != 0)
return r;
@@ -2235,6 +2270,7 @@ kex_to_blob(struct sshbuf *m, struct kex *kex)
(r = sshbuf_put_u32(m, kex->hostkey_type)) != 0 ||
(r = sshbuf_put_u32(m, kex->hostkey_nid)) != 0 ||
(r = sshbuf_put_u32(m, kex->kex_type)) != 0 ||
+ (r = sshbuf_put_u32(m, kex->kex_strict)) != 0 ||
(r = sshbuf_put_stringb(m, kex->my)) != 0 ||
(r = sshbuf_put_stringb(m, kex->peer)) != 0 ||
(r = sshbuf_put_stringb(m, kex->client_version)) != 0 ||
@@ -2397,6 +2433,7 @@ kex_from_blob(struct sshbuf *m, struct kex **kexp)
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_type)) != 0 ||
(r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_nid)) != 0 ||
(r = sshbuf_get_u32(m, &kex->kex_type)) != 0 ||
+ (r = sshbuf_get_u32(m, &kex->kex_strict)) != 0 ||
(r = sshbuf_get_stringb(m, kex->my)) != 0 ||
(r = sshbuf_get_stringb(m, kex->peer)) != 0 ||
(r = sshbuf_get_stringb(m, kex->client_version)) != 0 ||
@@ -2724,6 +2761,7 @@ sshpkt_disconnect(struct ssh *ssh, const char *fmt,...)
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
+ debug2("sending SSH2_MSG_DISCONNECT: %s", buf);
if ((r = sshpkt_start(ssh, SSH2_MSG_DISCONNECT)) != 0 ||
(r = sshpkt_put_u32(ssh, SSH2_DISCONNECT_PROTOCOL_ERROR)) != 0 ||
(r = sshpkt_put_cstring(ssh, buf)) != 0 ||
diff --git a/sshconnect2.c b/sshconnect2.c
index 5df9477..617ed9f 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -218,7 +218,8 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port)
fatal("%s: kex_assemble_namelist", __func__);
free(all_key);
- if ((s = kex_names_cat(options.kex_algorithms, "ext-info-c")) == NULL)
+ if ((s = kex_names_cat(options.kex_algorithms,
+ "ext-info-c,kex-strict-c-v00@openssh.com")) == NULL)
fatal("%s: kex_names_cat", __func__);
myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(s);
myproposal[PROPOSAL_ENC_ALGS_CTOS] =
@@ -343,7 +344,6 @@ struct cauthmethod {
};
static int input_userauth_service_accept(int, u_int32_t, struct ssh *);
-static int input_userauth_ext_info(int, u_int32_t, struct ssh *);
static int input_userauth_success(int, u_int32_t, struct ssh *);
static int input_userauth_failure(int, u_int32_t, struct ssh *);
static int input_userauth_banner(int, u_int32_t, struct ssh *);
@@ -460,7 +460,7 @@ ssh_userauth2(struct ssh *ssh, const char *local_user,
ssh->authctxt = &authctxt;
ssh_dispatch_init(ssh, &input_userauth_error);
- ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, &input_userauth_ext_info);
+ ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, kex_input_ext_info);
ssh_dispatch_set(ssh, SSH2_MSG_SERVICE_ACCEPT, &input_userauth_service_accept);
ssh_dispatch_run_fatal(ssh, DISPATCH_BLOCK, &authctxt.success); /* loop until success */
pubkey_cleanup(ssh);
@@ -505,13 +505,6 @@ input_userauth_service_accept(int type, u_int32_t seq, struct ssh *ssh)
return r;
}
-/* ARGSUSED */
-static int
-input_userauth_ext_info(int type, u_int32_t seqnr, struct ssh *ssh)
-{
- return kex_input_ext_info(type, seqnr, ssh);
-}
-
void
userauth(struct ssh *ssh, char *authlist)
{
@@ -593,6 +586,7 @@ input_userauth_success(int type, u_int32_t seq, struct ssh *ssh)
free(authctxt->methoddata);
authctxt->methoddata = NULL;
authctxt->success = 1; /* break out */
+ ssh_dispatch_set(ssh, SSH2_MSG_EXT_INFO, dispatch_protocol_error);
return 0;
}
diff --git a/sshd.c b/sshd.c
index 60b2aaf..ffea38c 100644
--- a/sshd.c
+++ b/sshd.c
@@ -2323,11 +2323,13 @@ static void
do_ssh2_kex(struct ssh *ssh)
{
char *myproposal[PROPOSAL_MAX] = { KEX_SERVER };
+ char *s;
struct kex *kex;
int r;
- myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(
- options.kex_algorithms);
+ if ((s = kex_names_cat(options.kex_algorithms, "kex-strict-s-v00@openssh.com")) == NULL)
+ fatal("kex_names_cat");
+ myproposal[PROPOSAL_KEX_ALGS] = compat_kex_proposal(s);
myproposal[PROPOSAL_ENC_ALGS_CTOS] = compat_cipher_proposal(
options.ciphers);
myproposal[PROPOSAL_ENC_ALGS_STOC] = compat_cipher_proposal(
@@ -2382,6 +2384,7 @@ do_ssh2_kex(struct ssh *ssh)
packet_send();
packet_write_wait();
#endif
+ free(s);
debug("KEX done");
}
--
2.25.1

View File

@@ -0,0 +1,95 @@
From 7ef3787c84b6b524501211b11a26c742f829af1a Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Mon, 18 Dec 2023 14:47:44 +0000
Subject: [PATCH] upstream: ban user/hostnames with most shell metacharacters
This makes ssh(1) refuse user or host names provided on the
commandline that contain most shell metacharacters.
Some programs that invoke ssh(1) using untrusted data do not filter
metacharacters in arguments they supply. This could create
interactions with user-specified ProxyCommand and other directives
that allow shell injection attacks to occur.
It's a mistake to invoke ssh(1) with arbitrary untrusted arguments,
but getting this stuff right can be tricky, so this should prevent
most obvious ways of creating risky situations. It however is not
and cannot be perfect: ssh(1) has no practical way of interpreting
what shell quoting rules are in use and how they interact with the
user's specified ProxyCommand.
To allow configurations that use strange user or hostnames to
continue to work, this strictness is applied only to names coming
from the commandline. Names specified using User or Hostname
directives in ssh_config(5) are not affected.
feedback/ok millert@ markus@ dtucker@ deraadt@
OpenBSD-Commit-ID: 3b487348b5964f3e77b6b4d3da4c3b439e94b2d9
CVE: CVE-2023-51385
Upstream-Status: Backport [https://github.com/openssh/openssh-portable/commit/7ef3787c84b6b524501211b11a26c742f829af1a]
Signed-off-by: Ranjitsinh Rathod <ranjitsinh.rathod@kpit.com>
Comment: Hunks refreshed to apply cleanly
---
ssh.c | 41 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/ssh.c b/ssh.c
index 35c48e62d18..48d93ddf2a9 100644
--- a/ssh.c
+++ b/ssh.c
@@ -583,6 +583,41 @@ set_addrinfo_port(struct addrinfo *addrs
}
}
+static int
+valid_hostname(const char *s)
+{
+ size_t i;
+
+ if (*s == '-')
+ return 0;
+ for (i = 0; s[i] != 0; i++) {
+ if (strchr("'`\"$\\;&<>|(){}", s[i]) != NULL ||
+ isspace((u_char)s[i]) || iscntrl((u_char)s[i]))
+ return 0;
+ }
+ return 1;
+}
+
+static int
+valid_ruser(const char *s)
+{
+ size_t i;
+
+ if (*s == '-')
+ return 0;
+ for (i = 0; s[i] != 0; i++) {
+ if (strchr("'`\";&<>|(){}", s[i]) != NULL)
+ return 0;
+ /* Disallow '-' after whitespace */
+ if (isspace((u_char)s[i]) && s[i + 1] == '-')
+ return 0;
+ /* Disallow \ in last position */
+ if (s[i] == '\\' && s[i + 1] == '\0')
+ return 0;
+ }
+ return 1;
+}
+
/*
* Main program for the ssh client.
*/
@@ -1069,6 +1104,10 @@ main(int ac, char **av)
if (!host)
usage();
+ if (!valid_hostname(host))
+ fatal("hostname contains invalid characters");
+ if (options.user != NULL && !valid_ruser(options.user))
+ fatal("remote username contains invalid characters");
host_arg = xstrdup(host);
/* Initialize the command to execute on remote host. */

View File

@@ -27,6 +27,20 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
file://CVE-2020-14145.patch \
file://CVE-2021-28041.patch \
file://CVE-2021-41617.patch \
file://CVE-2023-38408-01.patch \
file://CVE-2023-38408-02.patch \
file://CVE-2023-38408-03.patch \
file://CVE-2023-38408-04.patch \
file://CVE-2023-38408-05.patch \
file://CVE-2023-38408-06.patch \
file://CVE-2023-38408-07.patch \
file://CVE-2023-38408-08.patch \
file://CVE-2023-38408-09.patch \
file://CVE-2023-38408-10.patch \
file://CVE-2023-38408-11.patch \
file://CVE-2023-38408-12.patch \
file://CVE-2023-48795.patch \
file://CVE-2023-51385.patch \
"
SRC_URI[md5sum] = "3076e6413e8dbe56d33848c1054ac091"
SRC_URI[sha256sum] = "43925151e6cf6cee1450190c0e9af4dc36b41c12737619edff8bcebdff64e671"

View File

@@ -0,0 +1,38 @@
From 679ae2f72ef8cf37609cb0eff5de3b98aa85e395 Mon Sep 17 00:00:00 2001
From: Steve Sakoman <steve@sakoman.com>
Date: Thu, 20 Jul 2023 04:14:42 -1000
Subject: [PATCH] Configure: add 2 missing key sorts in generation of unified_info
Otherwise generation of this section in configdata.pm is not reproducible
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Upstream-Status: Backport [adapted from 3.x commit https://github.com/openssl/openssl/commit/764cf5b26306a8712e8b3d41599c44dc5ed07a25]
---
Configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Configure b/Configure
index 2a01746..8fc5a2c 100755
--- a/Configure
+++ b/Configure
@@ -2326,7 +2326,7 @@ EOF
"dso" => [ @{$unified_info{engines}} ],
"bin" => [ @{$unified_info{programs}} ],
"script" => [ @{$unified_info{scripts}} ] );
- foreach my $type (keys %loopinfo) {
+ foreach my $type (sort keys %loopinfo) {
foreach my $product (@{$loopinfo{$type}}) {
my %dirs = ();
my $pd = dirname($product);
@@ -2347,7 +2347,7 @@ EOF
push @{$unified_info{dirinfo}->{$d}->{deps}}, $_
if $d ne $pd;
}
- foreach (keys %dirs) {
+ foreach (sort keys %dirs) {
push @{$unified_info{dirinfo}->{$_}->{products}->{$type}},
$product;
}
--
2.34.1

View File

@@ -0,0 +1,37 @@
From 326909baf81a638d51fa8be1d8227518784f5cc4 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Tue, 14 Sep 2021 12:18:25 +0200
Subject: [PATCH] Configure: do not tweak mips cflags
This conflicts with mips machine definitons from yocto,
e.g.
| Error: -mips3 conflicts with the other architecture options, which imply -mips64r2
Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
Configure | 10 ----------
1 file changed, 10 deletions(-)
Index: openssl-3.0.4/Configure
===================================================================
--- openssl-3.0.4.orig/Configure
+++ openssl-3.0.4/Configure
@@ -1243,16 +1243,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m)
push @{$config{shared_ldflag}}, "-mno-cygwin";
}
-if ($target =~ /linux.*-mips/ && !$disabled{asm}
- && !grep { $_ =~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) {
- # minimally required architecture flags for assembly modules
- my $value;
- $value = '-mips2' if ($target =~ /mips32/);
- $value = '-mips3' if ($target =~ /mips64/);
- unshift @{$config{cflags}}, $value;
- unshift @{$config{cxxflags}}, $value if $config{CXX};
-}
-
# If threads aren't disabled, check how possible they are
unless ($disabled{threads}) {
if ($auto_threads) {

View File

@@ -1,226 +0,0 @@
From 879f7080d7e141f415c79eaa3a8ac4a3dad0348b Mon Sep 17 00:00:00 2001
From: Pauli <pauli@openssl.org>
Date: Wed, 8 Mar 2023 15:28:20 +1100
Subject: [PATCH] x509: excessive resource use verifying policy constraints
A security vulnerability has been identified in all supported versions
of OpenSSL related to the verification of X.509 certificate chains
that include policy constraints. Attackers may be able to exploit this
vulnerability by creating a malicious certificate chain that triggers
exponential use of computational resources, leading to a denial-of-service
(DoS) attack on affected systems.
Fixes CVE-2023-0464
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/20569)
CVE: CVE-2023-0464
Upstream-Status: Backport [https://git.openssl.org/gitweb/?p=openssl.git;a=patch;h=879f7080d7e141f415c79eaa3a8ac4a3dad0348b]
Signed-off-by: Nikhil R <nikhil.r@kpit.com>
---
crypto/x509v3/pcy_local.h | 8 +++++++-
crypto/x509v3/pcy_node.c | 12 +++++++++---
crypto/x509v3/pcy_tree.c | 37 +++++++++++++++++++++++++++----------
3 files changed, 43 insertions(+), 14 deletions(-)
diff --git a/crypto/x509v3/pcy_local.h b/crypto/x509v3/pcy_local.h
index 5daf78de45..344aa06765 100644
--- a/crypto/x509v3/pcy_local.h
+++ b/crypto/x509v3/pcy_local.h
@@ -111,6 +111,11 @@ struct X509_POLICY_LEVEL_st {
};
struct X509_POLICY_TREE_st {
+ /* The number of nodes in the tree */
+ size_t node_count;
+ /* The maximum number of nodes in the tree */
+ size_t node_maximum;
+
/* This is the tree 'level' data */
X509_POLICY_LEVEL *levels;
int nlevel;
@@ -159,7 +164,8 @@ X509_POLICY_NODE *tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk,
X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
X509_POLICY_DATA *data,
X509_POLICY_NODE *parent,
- X509_POLICY_TREE *tree);
+ X509_POLICY_TREE *tree,
+ int extra_data);
void policy_node_free(X509_POLICY_NODE *node);
int policy_node_match(const X509_POLICY_LEVEL *lvl,
const X509_POLICY_NODE *node, const ASN1_OBJECT *oid);
diff --git a/crypto/x509v3/pcy_node.c b/crypto/x509v3/pcy_node.c
index e2d7b15322..d574fb9d66 100644
--- a/crypto/x509v3/pcy_node.c
+++ b/crypto/x509v3/pcy_node.c
@@ -59,10 +59,15 @@ X509_POLICY_NODE *level_find_node(const X509_POLICY_LEVEL *level,
X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
X509_POLICY_DATA *data,
X509_POLICY_NODE *parent,
- X509_POLICY_TREE *tree)
+ X509_POLICY_TREE *tree,
+ int extra_data)
{
X509_POLICY_NODE *node;
+ /* Verify that the tree isn't too large. This mitigates CVE-2023-0464 */
+ if (tree->node_maximum > 0 && tree->node_count >= tree->node_maximum)
+ return NULL;
+
node = OPENSSL_zalloc(sizeof(*node));
if (node == NULL) {
X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE);
@@ -70,7 +75,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
}
node->data = data;
node->parent = parent;
- if (level) {
+ if (level != NULL) {
if (OBJ_obj2nid(data->valid_policy) == NID_any_policy) {
if (level->anyPolicy)
goto node_error;
@@ -90,7 +95,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
}
}
- if (tree) {
+ if (extra_data) {
if (tree->extra_data == NULL)
tree->extra_data = sk_X509_POLICY_DATA_new_null();
if (tree->extra_data == NULL){
@@ -103,6 +108,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
}
}
+ tree->node_count++;
if (parent)
parent->nchild++;
diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c
index 6e8322cbc5..6c7fd35405 100644
--- a/crypto/x509v3/pcy_tree.c
+++ b/crypto/x509v3/pcy_tree.c
@@ -13,6 +13,18 @@
#include "pcy_local.h"
+/*
+ * If the maximum number of nodes in the policy tree isn't defined, set it to
+ * a generous default of 1000 nodes.
+ *
+ * Defining this to be zero means unlimited policy tree growth which opens the
+ * door on CVE-2023-0464.
+ */
+
+#ifndef OPENSSL_POLICY_TREE_NODES_MAX
+# define OPENSSL_POLICY_TREE_NODES_MAX 1000
+#endif
+
/*
* Enable this to print out the complete policy tree at various point during
* evaluation.
@@ -168,6 +180,9 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
return X509_PCY_TREE_INTERNAL;
}
+ /* Limit the growth of the tree to mitigate CVE-2023-0464 */
+ tree->node_maximum = OPENSSL_POLICY_TREE_NODES_MAX;
+
/*
* http://tools.ietf.org/html/rfc5280#section-6.1.2, figure 3.
*
@@ -184,7 +199,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
level = tree->levels;
if ((data = policy_data_new(NULL, OBJ_nid2obj(NID_any_policy), 0)) == NULL)
goto bad_tree;
- if (level_add_node(level, data, NULL, tree) == NULL) {
+ if (level_add_node(level, data, NULL, tree, 1) == NULL) {
policy_data_free(data);
goto bad_tree;
}
@@ -243,7 +258,8 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
* Return value: 1 on success, 0 otherwise
*/
static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
- X509_POLICY_DATA *data)
+ X509_POLICY_DATA *data,
+ X509_POLICY_TREE *tree)
{
X509_POLICY_LEVEL *last = curr - 1;
int i, matched = 0;
@@ -253,13 +269,13 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
X509_POLICY_NODE *node = sk_X509_POLICY_NODE_value(last->nodes, i);
if (policy_node_match(last, node, data->valid_policy)) {
- if (level_add_node(curr, data, node, NULL) == NULL)
+ if (level_add_node(curr, data, node, tree, 0) == NULL)
return 0;
matched = 1;
}
}
if (!matched && last->anyPolicy) {
- if (level_add_node(curr, data, last->anyPolicy, NULL) == NULL)
+ if (level_add_node(curr, data, last->anyPolicy, tree, 0) == NULL)
return 0;
}
return 1;
@@ -272,7 +288,8 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
* Return value: 1 on success, 0 otherwise.
*/
static int tree_link_nodes(X509_POLICY_LEVEL *curr,
- const X509_POLICY_CACHE *cache)
+ const X509_POLICY_CACHE *cache,
+ X509_POLICY_TREE *tree)
{
int i;
@@ -280,7 +297,7 @@ static int tree_link_nodes(X509_POLICY_LEVEL *curr,
X509_POLICY_DATA *data = sk_X509_POLICY_DATA_value(cache->data, i);
/* Look for matching nodes in previous level */
- if (!tree_link_matching_nodes(curr, data))
+ if (!tree_link_matching_nodes(curr, data, tree))
return 0;
}
return 1;
@@ -311,7 +328,7 @@ static int tree_add_unmatched(X509_POLICY_LEVEL *curr,
/* Curr may not have anyPolicy */
data->qualifier_set = cache->anyPolicy->qualifier_set;
data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS;
- if (level_add_node(curr, data, node, tree) == NULL) {
+ if (level_add_node(curr, data, node, tree, 1) == NULL) {
policy_data_free(data);
return 0;
}
@@ -373,7 +390,7 @@ static int tree_link_any(X509_POLICY_LEVEL *curr,
}
/* Finally add link to anyPolicy */
if (last->anyPolicy &&
- level_add_node(curr, cache->anyPolicy, last->anyPolicy, NULL) == NULL)
+ level_add_node(curr, cache->anyPolicy, last->anyPolicy, tree, 0) == NULL)
return 0;
return 1;
}
@@ -555,7 +572,7 @@ static int tree_calculate_user_set(X509_POLICY_TREE *tree,
extra->qualifier_set = anyPolicy->data->qualifier_set;
extra->flags = POLICY_DATA_FLAG_SHARED_QUALIFIERS
| POLICY_DATA_FLAG_EXTRA_NODE;
- node = level_add_node(NULL, extra, anyPolicy->parent, tree);
+ node = level_add_node(NULL, extra, anyPolicy->parent, tree, 1);
}
if (!tree->user_policies) {
tree->user_policies = sk_X509_POLICY_NODE_new_null();
@@ -582,7 +599,7 @@ static int tree_evaluate(X509_POLICY_TREE *tree)
for (i = 1; i < tree->nlevel; i++, curr++) {
cache = policy_cache_set(curr->cert);
- if (!tree_link_nodes(curr, cache))
+ if (!tree_link_nodes(curr, cache, tree))
return X509_PCY_TREE_INTERNAL;
if (!(curr->flags & X509_V_FLAG_INHIBIT_ANY)
--
2.34.1

View File

@@ -1,60 +0,0 @@
From b013765abfa80036dc779dd0e50602c57bb3bf95 Mon Sep 17 00:00:00 2001
From: Matt Caswell <matt@openssl.org>
Date: Tue, 7 Mar 2023 16:52:55 +0000
Subject: [PATCH] Ensure that EXFLAG_INVALID_POLICY is checked even in leaf
certs
Even though we check the leaf cert to confirm it is valid, we
later ignored the invalid flag and did not notice that the leaf
cert was bad.
Fixes: CVE-2023-0465
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20588)
CVE: CVE-2023-0465
Upstream-Status: Backport [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=b013765abfa80036dc779dd0e50602c57bb3bf95]
Comment: Refreshed first hunk
Signed-off-by: Omkar Patil <omkar.patil@kpit.com>
---
crypto/x509/x509_vfy.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index 925fbb5412..1dfe4f9f31 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -1649,18 +1649,25 @@
}
/* Invalid or inconsistent extensions */
if (ret == X509_PCY_TREE_INVALID) {
- int i;
+ int i, cbcalled = 0;
/* Locate certificates with bad extensions and notify callback. */
- for (i = 1; i < sk_X509_num(ctx->chain); i++) {
+ for (i = 0; i < sk_X509_num(ctx->chain); i++) {
X509 *x = sk_X509_value(ctx->chain, i);
if (!(x->ex_flags & EXFLAG_INVALID_POLICY))
continue;
+ cbcalled = 1;
if (!verify_cb_cert(ctx, x, i,
X509_V_ERR_INVALID_POLICY_EXTENSION))
return 0;
}
+ if (!cbcalled) {
+ /* Should not be able to get here */
+ X509err(X509_F_CHECK_POLICY, ERR_R_INTERNAL_ERROR);
+ return 0;
+ }
+ /* The callback ignored the error so we return success */
return 1;
}
if (ret == X509_PCY_TREE_FAILURE) {
--
2.34.1

View File

@@ -1,82 +0,0 @@
From 0d16b7e99aafc0b4a6d729eec65a411a7e025f0a Mon Sep 17 00:00:00 2001
From: Tomas Mraz <tomas@openssl.org>
Date: Tue, 21 Mar 2023 16:15:47 +0100
Subject: [PATCH] Fix documentation of X509_VERIFY_PARAM_add0_policy()
The function was incorrectly documented as enabling policy checking.
Fixes: CVE-2023-0466
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20564)
CVE: CVE-2023-0466
Upstream-Status: Backport [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=0d16b7e99aafc0b4a6d729eec65a411a7e025f0a]
Comment: Refreshed first hunk from CHANGE and NEWS
Signed-off-by: Omkar Patil <omkar.patil@kpit.com>
---
CHANGES | 5 +++++
NEWS | 1 +
doc/man3/X509_VERIFY_PARAM_set_flags.pod | 9 +++++++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/CHANGES b/CHANGES
index efccf7838e..b19f1429bb 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,11 @@
Changes between 1.1.1s and 1.1.1t [7 Feb 2023]
+ *) Corrected documentation of X509_VERIFY_PARAM_add0_policy() to mention
+ that it does not enable policy checking. Thanks to
+ David Benjamin for discovering this issue. (CVE-2023-0466)
+ [Tomas Mraz]
+
*) Fixed X.400 address type confusion in X.509 GeneralName.
There is a type confusion vulnerability relating to X.400 address processing
diff --git a/NEWS b/NEWS
index 36a9bb6890..62615693fa 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
Major changes between OpenSSL 1.1.1s and OpenSSL 1.1.1t [7 Feb 2023]
+ o Fixed documentation of X509_VERIFY_PARAM_add0_policy() (CVE-2023-0466)
o Fixed X.400 address type confusion in X.509 GeneralName (CVE-2023-0286)
o Fixed Use-after-free following BIO_new_NDEF (CVE-2023-0215)
o Fixed Double free after calling PEM_read_bio_ex (CVE-2022-4450)
diff --git a/doc/man3/X509_VERIFY_PARAM_set_flags.pod b/doc/man3/X509_VERIFY_PARAM_set_flags.pod
index f6f304bf7b..aa292f9336 100644
--- a/doc/man3/X509_VERIFY_PARAM_set_flags.pod
+++ b/doc/man3/X509_VERIFY_PARAM_set_flags.pod
@@ -92,8 +92,9 @@ B<trust>.
X509_VERIFY_PARAM_set_time() sets the verification time in B<param> to
B<t>. Normally the current time is used.
-X509_VERIFY_PARAM_add0_policy() enables policy checking (it is disabled
-by default) and adds B<policy> to the acceptable policy set.
+X509_VERIFY_PARAM_add0_policy() adds B<policy> to the acceptable policy set.
+Contrary to preexisting documentation of this function it does not enable
+policy checking.
X509_VERIFY_PARAM_set1_policies() enables policy checking (it is disabled
by default) and sets the acceptable policy set to B<policies>. Any existing
@@ -377,6 +378,10 @@ and has no effect.
The X509_VERIFY_PARAM_get_hostflags() function was added in OpenSSL 1.1.0i.
+The function X509_VERIFY_PARAM_add0_policy() was historically documented as
+enabling policy checking however the implementation has never done this.
+The documentation was changed to align with the implementation.
+
=head1 COPYRIGHT
Copyright 2009-2020 The OpenSSL Project Authors. All Rights Reserved.
--
2.34.1

View File

@@ -0,0 +1,122 @@
Backport of:
From 09df4395b5071217b76dc7d3d2e630eb8c5a79c2 Mon Sep 17 00:00:00 2001
From: Matt Caswell <matt@openssl.org>
Date: Fri, 19 Jan 2024 11:28:58 +0000
Subject: [PATCH] Add NULL checks where ContentInfo data can be NULL
PKCS12 structures contain PKCS7 ContentInfo fields. These fields are
optional and can be NULL even if the "type" is a valid value. OpenSSL
was not properly accounting for this and a NULL dereference can occur
causing a crash.
CVE-2024-0727
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23362)
(cherry picked from commit d135eeab8a5dbf72b3da5240bab9ddb7678dbd2c)
Upstream-Status: Backport [https://github.com/openssl/openssl/commit/d135eeab8a5dbf72b3da5240bab9ddb7678dbd2c]
CVE: CVE-2024-0727
Signed-off-by: virendra thakur <virendrak@kpit.com>
---
crypto/pkcs12/p12_add.c | 18 ++++++++++++++++++
crypto/pkcs12/p12_mutl.c | 5 +++++
crypto/pkcs12/p12_npas.c | 5 +++--
crypto/pkcs7/pk7_mime.c | 7 +++++--
4 files changed, 31 insertions(+), 4 deletions(-)
--- a/crypto/pkcs12/p12_add.c
+++ b/crypto/pkcs12/p12_add.c
@@ -76,6 +76,13 @@ STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_
PKCS12_R_CONTENT_TYPE_NOT_DATA);
return NULL;
}
+
+ if (p7->d.data == NULL) {
+ PKCS12err(PKCS12_F_PKCS12_UNPACK_P7DATA,
+ PKCS12_R_DECODE_ERROR);
+ return NULL;
+ }
+
return ASN1_item_unpack(p7->d.data, ASN1_ITEM_rptr(PKCS12_SAFEBAGS));
}
@@ -132,6 +139,12 @@ STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_
{
if (!PKCS7_type_is_encrypted(p7))
return NULL;
+
+ if (p7->d.encrypted == NULL) {
+ PKCS12err(PKCS12_F_PKCS12_UNPACK_P7DATA, PKCS12_R_DECODE_ERROR);
+ return NULL;
+ }
+
return PKCS12_item_decrypt_d2i(p7->d.encrypted->enc_data->algorithm,
ASN1_ITEM_rptr(PKCS12_SAFEBAGS),
pass, passlen,
@@ -159,6 +172,13 @@ STACK_OF(PKCS7) *PKCS12_unpack_authsafes
PKCS12_R_CONTENT_TYPE_NOT_DATA);
return NULL;
}
+
+ if (p12->authsafes->d.data == NULL) {
+ PKCS12err(PKCS12_F_PKCS12_UNPACK_AUTHSAFES,
+ PKCS12_R_DECODE_ERROR);
+ return NULL;
+ }
+
return ASN1_item_unpack(p12->authsafes->d.data,
ASN1_ITEM_rptr(PKCS12_AUTHSAFES));
}
--- a/crypto/pkcs12/p12_mutl.c
+++ b/crypto/pkcs12/p12_mutl.c
@@ -93,6 +93,11 @@ static int pkcs12_gen_mac(PKCS12 *p12, c
return 0;
}
+ if (p12->authsafes->d.data == NULL) {
+ PKCS12err(PKCS12_F_PKCS12_GEN_MAC, PKCS12_R_DECODE_ERROR);
+ return 0;
+ }
+
salt = p12->mac->salt->data;
saltlen = p12->mac->salt->length;
if (!p12->mac->iter)
--- a/crypto/pkcs12/p12_npas.c
+++ b/crypto/pkcs12/p12_npas.c
@@ -78,8 +78,9 @@ static int newpass_p12(PKCS12 *p12, cons
bags = PKCS12_unpack_p7data(p7);
} else if (bagnid == NID_pkcs7_encrypted) {
bags = PKCS12_unpack_p7encdata(p7, oldpass, -1);
- if (!alg_get(p7->d.encrypted->enc_data->algorithm,
- &pbe_nid, &pbe_iter, &pbe_saltlen))
+ if (p7->d.encrypted == NULL
+ || !alg_get(p7->d.encrypted->enc_data->algorithm,
+ &pbe_nid, &pbe_iter, &pbe_saltlen))
goto err;
} else {
continue;
--- a/crypto/pkcs7/pk7_mime.c
+++ b/crypto/pkcs7/pk7_mime.c
@@ -30,10 +30,13 @@ int SMIME_write_PKCS7(BIO *bio, PKCS7 *p
{
STACK_OF(X509_ALGOR) *mdalgs;
int ctype_nid = OBJ_obj2nid(p7->type);
- if (ctype_nid == NID_pkcs7_signed)
+ if (ctype_nid == NID_pkcs7_signed) {
+ if (p7->d.sign == NULL)
+ return 0;
mdalgs = p7->d.sign->md_algs;
- else
+ } else {
mdalgs = NULL;
+ }
flags ^= SMIME_OLDMIME;

View File

@@ -18,16 +18,16 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
file://afalg.patch \
file://reproducible.patch \
file://reproducibility.patch \
file://CVE-2023-0464.patch \
file://CVE-2023-0465.patch \
file://CVE-2023-0466.patch \
file://0001-Configure-add-2-missing-key-sorts.patch \
file://0001-Configure-do-not-tweak-mips-cflags.patch \
file://CVE-2024-0727.patch \
"
SRC_URI_append_class-nativesdk = " \
file://environment.d-openssl.sh \
"
SRC_URI[sha256sum] = "8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b"
SRC_URI[sha256sum] = "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8"
inherit lib_package multilib_header multilib_script ptest
MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"

View File

@@ -11,7 +11,7 @@ AUTHOR = "Thomas Hood"
HOMEPAGE = "http://packages.debian.org/resolvconf"
RDEPENDS_${PN} = "bash"
SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=master \
SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \
file://fix-path-for-busybox.patch \
file://99_resolvconf \
"

View File

@@ -0,0 +1,82 @@
From c18ebf861528ef24958dd99a146482d2a40014c7 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Mon, 12 Jun 2023 17:48:47 +0200
Subject: [PATCH] shell: avoid segfault on ${0::0/0~09J}. Closes 15216
function old new delta
evaluate_string 1011 1053 +42
CVE: CVE-2022-48174
Upstream-Status: Backport [d417193cf37ca1005830d7e16f5fa7e1d8a44209]
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
shell/math.c | 39 +++++++++++++++++++++++++++++++++++----
1 file changed, 35 insertions(+), 4 deletions(-)
diff --git a/shell/math.c b/shell/math.c
index af1ab55c0..79824e81f 100644
--- a/shell/math.c
+++ b/shell/math.c
@@ -578,6 +578,28 @@ static arith_t strto_arith_t(const char *nptr, char **endptr)
# endif
#endif
+//TODO: much better estimation than expr_len/2? Such as:
+//static unsigned estimate_nums_and_names(const char *expr)
+//{
+// unsigned count = 0;
+// while (*(expr = skip_whitespace(expr)) != '\0') {
+// const char *p;
+// if (isdigit(*expr)) {
+// while (isdigit(*++expr))
+// continue;
+// count++;
+// continue;
+// }
+// p = endofname(expr);
+// if (p != expr) {
+// expr = p;
+// count++;
+// continue;
+// }
+// }
+// return count;
+//}
+
static arith_t FAST_FUNC
evaluate_string(arith_state_t *math_state, const char *expr)
{
@@ -585,10 +607,12 @@ evaluate_string(arith_state_t *math_state, const char *expr)
const char *errmsg;
const char *start_expr = expr = skip_whitespace(expr);
unsigned expr_len = strlen(expr) + 2;
- /* Stack of integers */
- /* The proof that there can be no more than strlen(startbuf)/2+1
- * integers in any given correct or incorrect expression
- * is left as an exercise to the reader. */
+ /* Stack of integers/names */
+ /* There can be no more than strlen(startbuf)/2+1
+ * integers/names in any given correct or incorrect expression.
+ * (modulo "09v09v09v09v09v" case,
+ * but we have code to detect that early)
+ */
var_or_num_t *const numstack = alloca((expr_len / 2) * sizeof(numstack[0]));
var_or_num_t *numstackptr = numstack;
/* Stack of operator tokens */
@@ -657,6 +681,13 @@ evaluate_string(arith_state_t *math_state, const char *expr)
numstackptr->var = NULL;
errno = 0;
numstackptr->val = strto_arith_t(expr, (char**) &expr);
+ /* A number can't be followed by another number, or a variable name.
+ * We'd catch this later anyway, but this would require numstack[]
+ * to be twice as deep to handle strings where _every_ char is
+ * a new number or name. Example: 09v09v09v09v09v09v09v09v09v
+ */
+ if (isalnum(*expr) || *expr == '_')
+ goto err;
if (errno)
numstackptr->val = 0; /* bash compat */
goto num;
--
2.40.1

View File

@@ -55,6 +55,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://CVE-2021-42374.patch \
file://CVE-2021-42376.patch \
file://CVE-2021-423xx-awk.patch \
file://CVE-2022-48174.patch \
file://0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch \
file://0002-nslookup-sanitize-all-printed-strings-with-printable.patch \
"

View File

@@ -8,6 +8,7 @@ SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://tmpdir.patch \
file://dbus-1.init \
file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
file://CVE-2023-34969.patch \
"
SRC_URI[sha256sum] = "bc42d196c1756ac520d61bf3ccd6f42013617def45dd1e591a6091abf51dca38"
@@ -31,3 +32,5 @@ PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd
PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,,"
CVE_PRODUCT += "d-bus_project:d-bus freedesktop:dbus freedesktop:libdbus"

View File

@@ -0,0 +1,96 @@
From 37a4dc5835731a1f7a81f1b67c45b8dfb556dd1c Mon Sep 17 00:00:00 2001
From: hongjinghao <q1204531485@163.com>
Date: Mon, 5 Jun 2023 18:17:06 +0100
Subject: [PATCH] bus: Assign a serial number for messages from the driver
Normally, it's enough to rely on a message being given a serial number
by the DBusConnection just before it is actually sent. However, in the
rare case where the policy blocks the driver from sending a message
(due to a deny rule or the outgoing message quota being full), we need
to get a valid serial number sooner, so that we can copy it into the
DBUS_HEADER_FIELD_REPLY_SERIAL field (which is mandatory) in the error
message sent to monitors. Otherwise, the dbus-daemon will crash with
an assertion failure if at least one Monitoring client is attached,
because zero is not a valid serial number to copy.
This fixes a denial-of-service vulnerability: if a privileged user is
monitoring the well-known system bus using a Monitoring client like
dbus-monitor or `busctl monitor`, then an unprivileged user can cause
denial-of-service by triggering this crash. A mitigation for this
vulnerability is to avoid attaching Monitoring clients to the system
bus when they are not needed. If there are no Monitoring clients, then
the vulnerable code is not reached.
Co-authored-by: Simon McVittie <smcv@collabora.com>
Resolves: dbus/dbus#457
(cherry picked from commit b159849e031000d1dbc1ab876b5fc78a3ce9b534)
---
bus/connection.c | 15 +++++++++++++++
dbus/dbus-connection-internal.h | 2 ++
dbus/dbus-connection.c | 11 ++++++++++-
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/bus/connection.c b/bus/connection.c
index b3583433..215f0230 100644
--- a/bus/connection.c
+++ b/bus/connection.c
@@ -2350,6 +2350,21 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
if (!dbus_message_set_sender (message, DBUS_SERVICE_DBUS))
return FALSE;
+ /* Make sure the message has a non-zero serial number, otherwise
+ * bus_transaction_capture_error_reply() will not be able to mock up
+ * a corresponding reply for it. Normally this would be delayed until
+ * the first time we actually send the message out from a
+ * connection, when the transaction is committed, but that's too late
+ * in this case.
+ */
+ if (dbus_message_get_serial (message) == 0)
+ {
+ dbus_uint32_t next_serial;
+
+ next_serial = _dbus_connection_get_next_client_serial (connection);
+ dbus_message_set_serial (message, next_serial);
+ }
+
if (bus_connection_is_active (connection))
{
if (!dbus_message_set_destination (message,
diff --git a/dbus/dbus-connection-internal.h b/dbus/dbus-connection-internal.h
index 48357321..ba79b192 100644
--- a/dbus/dbus-connection-internal.h
+++ b/dbus/dbus-connection-internal.h
@@ -54,6 +54,8 @@ DBUS_PRIVATE_EXPORT
DBusConnection * _dbus_connection_ref_unlocked (DBusConnection *connection);
DBUS_PRIVATE_EXPORT
void _dbus_connection_unref_unlocked (DBusConnection *connection);
+DBUS_PRIVATE_EXPORT
+dbus_uint32_t _dbus_connection_get_next_client_serial (DBusConnection *connection);
void _dbus_connection_queue_received_message_link (DBusConnection *connection,
DBusList *link);
dbus_bool_t _dbus_connection_has_messages_to_send_unlocked (DBusConnection *connection);
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index c525b6dc..09cef278 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -1456,7 +1456,16 @@ _dbus_connection_unref_unlocked (DBusConnection *connection)
_dbus_connection_last_unref (connection);
}
-static dbus_uint32_t
+/**
+ * Allocate and return the next non-zero serial number for outgoing messages.
+ *
+ * This method is only valid to call from single-threaded code, such as
+ * the dbus-daemon, or with the connection lock held.
+ *
+ * @param connection the connection
+ * @returns A suitable serial number for the next message to be sent on the connection.
+ */
+dbus_uint32_t
_dbus_connection_get_next_client_serial (DBusConnection *connection)
{
dbus_uint32_t serial;
--
2.25.1

View File

@@ -0,0 +1,290 @@
From 5f4485c4ff57fdefb1661531788def7ca5a47328 Mon Sep 17 00:00:00 2001
From: Philip Withnall <pwithnall@endlessos.org>
Date: Thu, 17 Aug 2023 04:19:44 +0000
Subject: [PATCH] gvariant-serialiser: Check offset table entry size is minimal
The entries in an offset table (which is used for variable sized arrays
and tuples containing variable sized members) are sized so that they can
address every byte in the overall variant.
The specification requires that for a variant to be in normal form, its
offset table entries must be the minimum width such that they can
address every byte in the variant.
That minimality requirement was not checked in
`g_variant_is_normal_form()`, leading to two different byte arrays being
interpreted as the normal form of a given variant tree. That kind of
confusion could potentially be exploited, and is certainly a bug.
Fix it by adding the necessary checks on offset table entry width, and
unit tests.
Spotted by William Manley.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2794
CVE: CVE-2023-29499
Upstream-Status: Backport from [https://gitlab.gnome.org/GNOME/glib/-/commit/5f4485c4ff57fdefb1661531788def7ca5a47328]
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
glib/gvariant-serialiser.c | 19 +++-
glib/tests/gvariant.c | 176 +++++++++++++++++++++++++++++++++++++
2 files changed, 194 insertions(+), 1 deletion(-)
diff --git a/glib/gvariant-serialiser.c b/glib/gvariant-serialiser.c
index 0bf7243..5aa2cbc 100644
--- a/glib/gvariant-serialiser.c
+++ b/glib/gvariant-serialiser.c
@@ -694,6 +694,10 @@ gvs_variable_sized_array_get_frame_offsets (GVariantSerialised value)
out.data_size = last_end;
out.array = value.data + last_end;
out.length = offsets_array_size / out.offset_size;
+
+ if (out.length > 0 && gvs_calculate_total_size (last_end, out.length) != value.size)
+ return out; /* offset size not minimal */
+
out.is_normal = TRUE;
return out;
@@ -1201,6 +1205,7 @@ gvs_tuple_is_normal (GVariantSerialised value)
gsize length;
gsize offset;
gsize i;
+ gsize offset_table_size;
/* as per the comment in gvs_tuple_get_child() */
if G_UNLIKELY (value.data == NULL && value.size != 0)
@@ -1305,7 +1310,19 @@ gvs_tuple_is_normal (GVariantSerialised value)
}
}
- return offset_ptr == offset;
+ /* @offset_ptr has been counting backwards from the end of the variant, to
+ * find the beginning of the offset table. @offset has been counting forwards
+ * from the beginning of the variant to find the end of the data. They should
+ * have met in the middle. */
+ if (offset_ptr != offset)
+ return FALSE;
+
+ offset_table_size = value.size - offset_ptr;
+ if (value.size > 0 &&
+ gvs_calculate_total_size (offset, offset_table_size / offset_size) != value.size)
+ return FALSE; /* offset size not minimal */
+
+ return TRUE;
}
/* Variants {{{2
diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
index d640c81..4ce0e4f 100644
--- a/glib/tests/gvariant.c
+++ b/glib/tests/gvariant.c
@@ -5092,6 +5092,86 @@ test_normal_checking_array_offsets2 (void)
g_variant_unref (variant);
}
+/* Test that an otherwise-valid serialised GVariant is considered non-normal if
+ * its offset table entries are too wide.
+ *
+ * See §2.3.6 (Framing Offsets) of the GVariant specification. */
+static void
+test_normal_checking_array_offsets_minimal_sized (void)
+{
+ GVariantBuilder builder;
+ gsize i;
+ GVariant *aay_constructed = NULL;
+ const guint8 *data = NULL;
+ guint8 *data_owned = NULL;
+ GVariant *aay_deserialised = NULL;
+ GVariant *aay_normalised = NULL;
+
+ /* Construct an array of type aay, consisting of 128 elements which are each
+ * an empty array, i.e. `[[] * 128]`. This is chosen because the inner
+ * elements are variable sized (making the outer array variable sized, so it
+ * must have an offset table), but they are also zero-sized when serialised.
+ * So the serialised representation of @aay_constructed consists entirely of
+ * its offset table, which is entirely zeroes.
+ *
+ * The array is chosen to be 128 elements long because that means offset
+ * table entries which are 1 byte long. If the elements in the array were
+ * non-zero-sized (to the extent that the overall array is ≥256 bytes long),
+ * the offset table entries would end up being 2 bytes long. */
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("aay"));
+
+ for (i = 0; i < 128; i++)
+ g_variant_builder_add_value (&builder, g_variant_new_array (G_VARIANT_TYPE_BYTE, NULL, 0));
+
+ aay_constructed = g_variant_builder_end (&builder);
+
+ /* Verify that the constructed array is in normal form, and its serialised
+ * form is `b'\0' * 128`. */
+ g_assert_true (g_variant_is_normal_form (aay_constructed));
+ g_assert_cmpuint (g_variant_n_children (aay_constructed), ==, 128);
+ g_assert_cmpuint (g_variant_get_size (aay_constructed), ==, 128);
+
+ data = g_variant_get_data (aay_constructed);
+ for (i = 0; i < g_variant_get_size (aay_constructed); i++)
+ g_assert_cmpuint (data[i], ==, 0);
+
+ /* Construct a serialised `aay` GVariant which is `b'\0' * 256`. This has to
+ * be a non-normal form of `[[] * 128]`, with 2-byte-long offset table
+ * entries, because each offset table entry has to be able to reference all of
+ * the byte boundaries in the container. All the entries in the offset table
+ * are zero, so all the elements of the array are zero-sized. */
+ data = data_owned = g_malloc0 (256);
+ aay_deserialised = g_variant_new_from_data (G_VARIANT_TYPE ("aay"),
+ data,
+ 256,
+ FALSE,
+ g_free,
+ g_steal_pointer (&data_owned));
+
+ g_assert_false (g_variant_is_normal_form (aay_deserialised));
+ g_assert_cmpuint (g_variant_n_children (aay_deserialised), ==, 128);
+ g_assert_cmpuint (g_variant_get_size (aay_deserialised), ==, 256);
+
+ data = g_variant_get_data (aay_deserialised);
+ for (i = 0; i < g_variant_get_size (aay_deserialised); i++)
+ g_assert_cmpuint (data[i], ==, 0);
+
+ /* Get its normal form. That should change the serialised size. */
+ aay_normalised = g_variant_get_normal_form (aay_deserialised);
+
+ g_assert_true (g_variant_is_normal_form (aay_normalised));
+ g_assert_cmpuint (g_variant_n_children (aay_normalised), ==, 128);
+ g_assert_cmpuint (g_variant_get_size (aay_normalised), ==, 128);
+
+ data = g_variant_get_data (aay_normalised);
+ for (i = 0; i < g_variant_get_size (aay_normalised); i++)
+ g_assert_cmpuint (data[i], ==, 0);
+
+ g_variant_unref (aay_normalised);
+ g_variant_unref (aay_deserialised);
+ g_variant_unref (aay_constructed);
+}
+
/* Test that a tuple with invalidly large values in its offset table is
* normalised successfully without looping infinitely. */
static void
@@ -5286,6 +5366,98 @@ test_normal_checking_tuple_offsets4 (void)
g_variant_unref (variant);
}
+/* Test that an otherwise-valid serialised GVariant is considered non-normal if
+ * its offset table entries are too wide.
+ *
+ * See §2.3.6 (Framing Offsets) of the GVariant specification. */
+static void
+test_normal_checking_tuple_offsets_minimal_sized (void)
+{
+ GString *type_string = NULL;
+ GVariantBuilder builder;
+ gsize i;
+ GVariant *ray_constructed = NULL;
+ const guint8 *data = NULL;
+ guint8 *data_owned = NULL;
+ GVariant *ray_deserialised = NULL;
+ GVariant *ray_normalised = NULL;
+
+ /* Construct a tuple of type (ay…ay), consisting of 129 members which are each
+ * an empty array, i.e. `([] * 129)`. This is chosen because the inner
+ * members are variable sized, so the outer tuple must have an offset table,
+ * but they are also zero-sized when serialised. So the serialised
+ * representation of @ray_constructed consists entirely of its offset table,
+ * which is entirely zeroes.
+ *
+ * The tuple is chosen to be 129 members long because that means it has 128
+ * offset table entries which are 1 byte long each. If the members in the
+ * tuple were non-zero-sized (to the extent that the overall tuple is ≥256
+ * bytes long), the offset table entries would end up being 2 bytes long.
+ *
+ * 129 members are used unlike 128 array elements in
+ * test_normal_checking_array_offsets_minimal_sized(), because the last member
+ * in a tuple never needs an offset table entry. */
+ type_string = g_string_new ("");
+ g_string_append_c (type_string, '(');
+ for (i = 0; i < 129; i++)
+ g_string_append (type_string, "ay");
+ g_string_append_c (type_string, ')');
+
+ g_variant_builder_init (&builder, G_VARIANT_TYPE (type_string->str));
+
+ for (i = 0; i < 129; i++)
+ g_variant_builder_add_value (&builder, g_variant_new_array (G_VARIANT_TYPE_BYTE, NULL, 0));
+
+ ray_constructed = g_variant_builder_end (&builder);
+
+ /* Verify that the constructed tuple is in normal form, and its serialised
+ * form is `b'\0' * 128`. */
+ g_assert_true (g_variant_is_normal_form (ray_constructed));
+ g_assert_cmpuint (g_variant_n_children (ray_constructed), ==, 129);
+ g_assert_cmpuint (g_variant_get_size (ray_constructed), ==, 128);
+
+ data = g_variant_get_data (ray_constructed);
+ for (i = 0; i < g_variant_get_size (ray_constructed); i++)
+ g_assert_cmpuint (data[i], ==, 0);
+
+ /* Construct a serialised `(ay…ay)` GVariant which is `b'\0' * 256`. This has
+ * to be a non-normal form of `([] * 129)`, with 2-byte-long offset table
+ * entries, because each offset table entry has to be able to reference all of
+ * the byte boundaries in the container. All the entries in the offset table
+ * are zero, so all the members of the tuple are zero-sized. */
+ data = data_owned = g_malloc0 (256);
+ ray_deserialised = g_variant_new_from_data (G_VARIANT_TYPE (type_string->str),
+ data,
+ 256,
+ FALSE,
+ g_free,
+ g_steal_pointer (&data_owned));
+
+ g_assert_false (g_variant_is_normal_form (ray_deserialised));
+ g_assert_cmpuint (g_variant_n_children (ray_deserialised), ==, 129);
+ g_assert_cmpuint (g_variant_get_size (ray_deserialised), ==, 256);
+
+ data = g_variant_get_data (ray_deserialised);
+ for (i = 0; i < g_variant_get_size (ray_deserialised); i++)
+ g_assert_cmpuint (data[i], ==, 0);
+
+ /* Get its normal form. That should change the serialised size. */
+ ray_normalised = g_variant_get_normal_form (ray_deserialised);
+
+ g_assert_true (g_variant_is_normal_form (ray_normalised));
+ g_assert_cmpuint (g_variant_n_children (ray_normalised), ==, 129);
+ g_assert_cmpuint (g_variant_get_size (ray_normalised), ==, 128);
+
+ data = g_variant_get_data (ray_normalised);
+ for (i = 0; i < g_variant_get_size (ray_normalised); i++)
+ g_assert_cmpuint (data[i], ==, 0);
+
+ g_variant_unref (ray_normalised);
+ g_variant_unref (ray_deserialised);
+ g_variant_unref (ray_constructed);
+ g_string_free (type_string, TRUE);
+}
+
/* Test that an empty object path is normalised successfully to the base object
* path, /. */
static void
@@ -5431,6 +5603,8 @@ main (int argc, char **argv)
test_normal_checking_array_offsets);
g_test_add_func ("/gvariant/normal-checking/array-offsets2",
test_normal_checking_array_offsets2);
+ g_test_add_func ("/gvariant/normal-checking/array-offsets/minimal-sized",
+ test_normal_checking_array_offsets_minimal_sized);
g_test_add_func ("/gvariant/normal-checking/tuple-offsets",
test_normal_checking_tuple_offsets);
g_test_add_func ("/gvariant/normal-checking/tuple-offsets2",
@@ -5439,6 +5613,8 @@ main (int argc, char **argv)
test_normal_checking_tuple_offsets3);
g_test_add_func ("/gvariant/normal-checking/tuple-offsets4",
test_normal_checking_tuple_offsets4);
+ g_test_add_func ("/gvariant/normal-checking/tuple-offsets/minimal-sized",
+ test_normal_checking_tuple_offsets_minimal_sized);
g_test_add_func ("/gvariant/normal-checking/empty-object-path",
test_normal_checking_empty_object_path);
--
2.24.4

Some files were not shown because too many files have changed in this diff Show More