Compare commits

...

66 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
83 changed files with 6008 additions and 71 deletions

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

@@ -227,7 +227,7 @@ 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
#
@@ -457,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

@@ -1,13 +1,13 @@
DISTRO : "3.1.31"
DISTRO : "3.1.33"
DISTRO_NAME_NO_CAP : "dunfell"
DISTRO_NAME : "Dunfell"
DISTRO_NAME_NO_CAP_MINUS_ONE : "zeus"
YOCTO_DOC_VERSION : "3.1.31"
YOCTO_DOC_VERSION : "3.1.33"
YOCTO_DOC_VERSION_MINUS_ONE : "3.0.4"
DISTRO_REL_TAG : "yocto-3.1.31"
DOCCONF_VERSION : "3.1.31"
DISTRO_REL_TAG : "yocto-3.1.33"
DOCCONF_VERSION : "3.1.33"
BITBAKE_SERIES : "1.46"
POKYVERSION : "23.0.31"
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

@@ -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

@@ -1,6 +1,6 @@
DISTRO = "poky"
DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
DISTRO_VERSION = "3.1.31"
DISTRO_VERSION = "3.1.33"
DISTRO_CODENAME = "dunfell"
SDK_VENDOR = "-pokysdk"
SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}', 'snapshot')}"

View File

@@ -6,10 +6,10 @@
# to the distro running on the build machine.
#
UNINATIVE_MAXGLIBCVERSION = "2.38"
UNINATIVE_VERSION = "4.3"
UNINATIVE_MAXGLIBCVERSION = "2.39"
UNINATIVE_VERSION = "4.4"
UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/"
UNINATIVE_CHECKSUM[aarch64] ?= "8df05f4a41455018b4303b2e0ea4eac5c960b5a13713f6dbb33dfdb3e32753ec"
UNINATIVE_CHECKSUM[i686] ?= "bea76b4a97c9ba0077c0dd1295f519cd599dbf71f0ca1c964471c4cdb043addd"
UNINATIVE_CHECKSUM[x86_64] ?= "1c35f09a75c4096749bbe1e009df4e3968cde151424062cf4aa3ed89db22b030"
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

@@ -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

@@ -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

@@ -40,6 +40,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
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,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

@@ -20,6 +20,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
file://reproducibility.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 = " \

View File

@@ -24,7 +24,7 @@ IMAGE_FSTYPES = "wic.vmdk"
inherit core-image setuptools3
SRCREV ?= "378b44705910e0b6f07b80ab185aae224448400c"
SRCREV ?= "77442211926cbe93d60108f6df4abda3bc06b735"
SRC_URI = "git://git.yoctoproject.org/poky;branch=dunfell \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \

View File

@@ -0,0 +1,38 @@
From 31c6ce3b63f8a494ad9e31ca65187a73d8ad3508 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Mon, 9 Nov 2020 17:55:44 +0100
Subject: [PATCH] Avoid call stack overflow with XML reader and recursive
XIncludes
Don't process XIncludes in the result of another inclusion to avoid
infinite recursion resulting in a call stack overflow.
This is something the XInclude engine shouldn't allow but correct
handling of intra-document includes would require major changes.
Found by OSS-Fuzz.
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/31c6ce3b63f8a494ad9e31ca65187a73d8ad3508]
CVE: CVE-2024-25062 #Dependency Patch
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
xmlreader.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xmlreader.c b/xmlreader.c
index 01adf74f4..72e40b032 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -1585,7 +1585,8 @@ node_found:
/*
* Handle XInclude if asked for
*/
- if ((reader->xinclude) && (reader->node != NULL) &&
+ if ((reader->xinclude) && (reader->in_xinclude == 0) &&
+ (reader->node != NULL) &&
(reader->node->type == XML_ELEMENT_NODE) &&
(reader->node->ns != NULL) &&
((xmlStrEqual(reader->node->ns->href, XINCLUDE_NS)) ||
--
GitLab

View File

@@ -0,0 +1,33 @@
From 2b0aac140d739905c7848a42efc60bfe783a39b7 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sat, 14 Oct 2023 22:45:54 +0200
Subject: [PATCH] [CVE-2024-25062] xmlreader: Don't expand XIncludes when
backtracking
Fixes a use-after-free if XML Reader if used with DTD validation and
XInclude expansion.
Fixes #604.
Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/2b0aac140d739905c7848a42efc60bfe783a39b7]
CVE: CVE-2024-25062
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
xmlreader.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xmlreader.c b/xmlreader.c
index 979385a13..fefd68e0b 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -1443,6 +1443,7 @@ node_found:
* Handle XInclude if asked for
*/
if ((reader->xinclude) && (reader->in_xinclude == 0) &&
+ (reader->state != XML_TEXTREADER_BACKTRACK) &&
(reader->node != NULL) &&
(reader->node->type == XML_ELEMENT_NODE) &&
(reader->node->ns != NULL) &&
--
GitLab

View File

@@ -44,6 +44,8 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=te
file://CVE-2021-3516.patch \
file://CVE-2023-45322-1.patch \
file://CVE-2023-45322-2.patch \
file://CVE-2024-25062-pre1.patch \
file://CVE-2024-25062.patch \
"
SRC_URI[archive.sha256sum] = "593b7b751dd18c2d6abcd0c4bcb29efc203d0b4373a6df98e3a455ea74ae2813"

View File

@@ -26,13 +26,17 @@ NVDCVE_API_KEY ?= ""
# Use a negative value to skip the update
CVE_DB_UPDATE_INTERVAL ?= "86400"
# Number of attmepts for each http query to nvd server before giving up
# CVE database incremental update age threshold, in seconds. If the database is
# older than this threshold, do a full re-download, else, do an incremental
# update. By default: the maximum allowed value from NVD: 120 days (120*24*60*60)
# Use 0 to force a full download.
CVE_DB_INCR_UPDATE_AGE_THRES ?= "10368000"
# Number of attempts for each http query to nvd server before giving up
CVE_DB_UPDATE_ATTEMPTS ?= "5"
CVE_DB_TEMP_FILE ?= "${CVE_CHECK_DB_DIR}/temp_nvdcve_2.db"
CVE_CHECK_DB_FILE ?= "${CVE_CHECK_DB_DIR}/nvdcve_2.db"
python () {
if not bb.data.inherits_class("cve-check", d):
raise bb.parse.SkipRecipe("Skip recipe when cve-check class is not loaded.")
@@ -119,7 +123,8 @@ def nvd_request_wait(attempt, min_wait):
def nvd_request_next(url, attempts, api_key, args, min_wait):
"""
Request next part of the NVD dabase
Request next part of the NVD database
NVD API documentation: https://nvd.nist.gov/developers/vulnerabilities
"""
import urllib.request
@@ -172,18 +177,24 @@ def update_db_file(db_tmp_file, d, database_time):
req_args = {'startIndex' : 0}
# The maximum range for time is 120 days
# Force a complete update if our range is longer
if (database_time != 0):
incr_update_threshold = int(d.getVar("CVE_DB_INCR_UPDATE_AGE_THRES"))
if database_time != 0:
database_date = datetime.datetime.fromtimestamp(database_time, tz=datetime.timezone.utc)
today_date = datetime.datetime.now(tz=datetime.timezone.utc)
delta = today_date - database_date
if delta.days < 120:
if incr_update_threshold == 0:
bb.note("CVE database: forced full update")
elif delta < datetime.timedelta(seconds=incr_update_threshold):
bb.note("CVE database: performing partial update")
# The maximum range for time is 120 days
if delta > datetime.timedelta(days=120):
bb.error("CVE database: Trying to do an incremental update on a larger than supported range")
req_args['lastModStartDate'] = database_date.isoformat()
req_args['lastModEndDate'] = today_date.isoformat()
else:
bb.note("CVE database: file too old, forcing a full update")
else:
bb.note("CVE database: no preexisting database, do a full download")
with bb.progress.ProgressHandler(d) as ph, open(os.path.join(d.getVar("TMPDIR"), 'cve_check'), 'a') as cve_f:
@@ -312,6 +323,10 @@ def update_db(conn, elt):
accessVector = None
cveId = elt['cve']['id']
if elt['cve']['vulnStatus'] == "Rejected":
c = conn.cursor()
c.execute("delete from PRODUCTS where ID = ?;", [cveId])
c.execute("delete from NVD where ID = ?;", [cveId])
c.close()
return
cveDesc = ""
for desc in elt['cve']['descriptions']:
@@ -341,6 +356,10 @@ def update_db(conn, elt):
[cveId, cveDesc, cvssv2, cvssv3, date, accessVector]).close()
try:
# Remove any pre-existing CVE configuration. Even for partial database
# update, those will be repopulated. This ensures that old
# configuration is not kept for an updated CVE.
conn.execute("delete from PRODUCTS where ID = ?", [cveId]).close()
for config in elt['cve']['configurations']:
# This is suboptimal as it doesn't handle AND/OR and negate, but is better than nothing
for node in config["nodes"]:

View File

@@ -0,0 +1,45 @@
Backport of:
Author: Sven Joachim <svenjoac@gmx.de>
Description: Change the --disable-root-environ configure option behavior
By default, the --disable-root-environ option forbids program run by
the superuser to load custom terminfo entries. This patch changes
that to only restrict programs running with elevated privileges,
matching the behavior of the --disable-setuid-environ option
introduced in the 20230423 upstream patchlevel.
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034372#29
Bug: https://lists.gnu.org/archive/html/bug-ncurses/2023-04/msg00018.html
Forwarded: not-needed
Last-Update: 2023-05-01
Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/ncurses/6.2-0ubuntu2.1/ncurses_6.2-0ubuntu2.1.debian.tar.xz]
CVE: CVE-2023-29491
Signed-off-by: Virendra Thakur <virendrak@kpit.com>
---
ncurses/tinfo/access.c | 2 --
1 file changed, 2 deletions(-)
--- a/ncurses/tinfo/access.c
+++ b/ncurses/tinfo/access.c
@@ -178,15 +178,16 @@ _nc_is_file_path(const char *path)
NCURSES_EXPORT(int)
_nc_env_access(void)
{
+ int result = TRUE;
+
#if HAVE_ISSETUGID
if (issetugid())
- return FALSE;
+ result = FALSE;
#elif HAVE_GETEUID && HAVE_GETEGID
if (getuid() != geteuid()
|| getgid() != getegid())
- return FALSE;
+ result = FALSE;
#endif
- /* ...finally, disallow root */
- return (getuid() != ROOT_UID) && (geteuid() != ROOT_UID);
+ return result;
}
#endif

View File

@@ -0,0 +1,79 @@
Fix for CVE-2023-50495 from upstream:
https://github.com/ThomasDickey/ncurses-snapshots/commit/efe9674ee14b14b788f9618941f97d31742f0adc
Reference:
https://invisible-island.net/archives/ncurses/6.4/ncurses-6.4-20230424.patch.gz
Upstream-Status: Backport [import from suse ftp.pbone.net/mirror/ftp.opensuse.org/update/leap-micro/5.3/sle/src/ncurses-6.1-150000.5.20.1.src.rpm
Upstream commit https://github.com/ThomasDickey/ncurses-snapshots/commit/efe9674ee14b14b788f9618941f97d31742f0adc]
CVE: CVE-2023-50495
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
ncurses/tinfo/parse_entry.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
index 23574b66..56ba9ae6 100644
--- a/ncurses/tinfo/parse_entry.c
+++ b/ncurses/tinfo/parse_entry.c
@@ -110,7 +110,7 @@ _nc_extend_names(ENTRY * entryp, const char *name, int token_type)
/* Well, we are given a cancel for a name that we don't recognize */
return _nc_extend_names(entryp, name, STRING);
default:
- return 0;
+ return NULL;
}
/* Adjust the 'offset' (insertion-point) to keep the lists of extended
@@ -142,6 +142,11 @@ _nc_extend_names(ENTRY * entryp, const char *name, int token_type)
for (last = (unsigned) (max - 1); last > tindex; last--)
if (!found) {
+ char *saved;
+
+ if ((saved = _nc_save_str(name)) == NULL)
+ return NULL;
+
switch (token_type) {
case BOOLEAN:
tp->ext_Booleans++;
@@ -169,7 +174,7 @@ _nc_extend_names(ENTRY * entryp, const char *name, int token_type)
TYPE_REALLOC(char *, actual, tp->ext_Names);
while (--actual > offset)
tp->ext_Names[actual] = tp->ext_Names[actual - 1];
- tp->ext_Names[offset] = _nc_save_str(name);
+ tp->ext_Names[offset] = saved;
}
temp.nte_name = tp->ext_Names[offset];
@@ -337,6 +342,8 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
bool is_use = (strcmp(_nc_curr_token.tk_name, "use") == 0);
bool is_tc = !is_use && (strcmp(_nc_curr_token.tk_name, "tc") == 0);
if (is_use || is_tc) {
+ char *saved;
+
if (!VALID_STRING(_nc_curr_token.tk_valstring)
|| _nc_curr_token.tk_valstring[0] == '\0') {
_nc_warning("missing name for use-clause");
@@ -350,11 +357,13 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
_nc_curr_token.tk_valstring);
continue;
}
- entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring);
- entryp->uses[entryp->nuses].line = _nc_curr_line;
- entryp->nuses++;
- if (entryp->nuses > 1 && is_tc) {
- BAD_TC_USAGE
+ if ((saved = _nc_save_str(_nc_curr_token.tk_valstring)) != NULL) {
+ entryp->uses[entryp->nuses].name = saved;
+ entryp->uses[entryp->nuses].line = _nc_curr_line;
+ entryp->nuses++;
+ if (entryp->nuses > 1 && is_tc) {
+ BAD_TC_USAGE
+ }
}
} else {
/* normal token lookup */
--
2.25.1

View File

@@ -5,11 +5,13 @@ SRC_URI += "file://0001-tic-hang.patch \
file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \
file://CVE-2021-39537.patch \
file://CVE-2022-29458.patch \
file://CVE-2023-29491.patch \
file://CVE-2023-50495.patch \
"
# commit id corresponds to the revision in package version
SRCREV = "a669013cd5e9d6434e5301348ea51baf306c93c4"
S = "${WORKDIR}/git"
EXTRA_OECONF += "--with-abi-version=5"
EXTRA_OECONF += "--with-abi-version=5 --disable-root-environ"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
# This is needed when using patchlevel versions like 6.1+20181013

View File

@@ -19,3 +19,6 @@ file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )
foreach(config ${toolchain_config_files})
include(${config})
endforeach()
unset(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
unset(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES)

View File

@@ -9,3 +9,6 @@ SRC_URI = ""
do_configure[depends] += "gcc-source-${PV}:do_preconfigure"
do_populate_lic[depends] += "gcc-source-${PV}:do_unpack"
# patch is available via gcc-source recipe
CVE_CHECK_WHITELIST += "CVE-2023-4039"

View File

@@ -71,7 +71,8 @@ SRC_URI += "\
file://CVE-2023-29402.patch \
file://CVE-2023-29404.patch \
file://CVE-2023-29400.patch \
file://CVE-2023-29406.patch \
file://CVE-2023-29406-1.patch \
file://CVE-2023-29406-2.patch \
file://CVE-2023-29409.patch \
file://CVE-2022-41725-pre1.patch \
file://CVE-2022-41725-pre2.patch \
@@ -87,6 +88,10 @@ SRC_URI += "\
file://CVE-2023-45287-pre2.patch \
file://CVE-2023-45287-pre3.patch \
file://CVE-2023-45287.patch \
file://CVE-2023-45289.patch \
file://CVE-2023-45290.patch \
file://CVE-2024-24785.patch \
file://CVE-2024-24784.patch \
"
SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"

View File

@@ -0,0 +1,114 @@
From c08a5fa413a34111c9a37fd9e545de27ab0978b1 Mon Sep 17 00:00:00 2001
From: Damien Neil <dneil@google.com>
Date: Wed, 19 Jul 2023 10:30:46 -0700
Subject: [PATCH] [release-branch.go1.19] net/http: permit requests with
invalid Host headers
Historically, the Transport has silently truncated invalid
Host headers at the first '/' or ' ' character. CL 506996 changed
this behavior to reject invalid Host headers entirely.
Unfortunately, Docker appears to rely on the previous behavior.
When sending a HTTP/1 request with an invalid Host, send an empty
Host header. This is safer than truncation: If you care about the
Host, then you should get the one you set; if you don't care,
then an empty Host should be fine.
Continue to fully validate Host headers sent to a proxy,
since proxies generally can't productively forward requests
without a Host.
For #60374
Fixes #61431
Fixes #61825
Change-Id: If170c7dd860aa20eb58fe32990fc93af832742b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/511155
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
(cherry picked from commit b9153f6ef338baee5fe02a867c8fbc83a8b29dd1)
Reviewed-on: https://go-review.googlesource.com/c/go/+/518855
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Upstream-Status: Backport [https://github.com/golang/go/commit/c08a5fa413a34111c9a37fd9e545de27ab0978b1]
CVE: CVE-2023-29406
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
src/net/http/request.go | 23 ++++++++++++++++++++++-
src/net/http/request_test.go | 17 ++++++++++++-----
2 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/src/net/http/request.go b/src/net/http/request.go
index 3100037386..91cb8a66b9 100644
--- a/src/net/http/request.go
+++ b/src/net/http/request.go
@@ -582,8 +582,29 @@ func (r *Request) write(w io.Writer, usingProxy bool, extraHeaders Header, waitF
if err != nil {
return err
}
+ // Validate that the Host header is a valid header in general,
+ // but don't validate the host itself. This is sufficient to avoid
+ // header or request smuggling via the Host field.
+ // The server can (and will, if it's a net/http server) reject
+ // the request if it doesn't consider the host valid.
if !httpguts.ValidHostHeader(host) {
- return errors.New("http: invalid Host header")
+ // Historically, we would truncate the Host header after '/' or ' '.
+ // Some users have relied on this truncation to convert a network
+ // address such as Unix domain socket path into a valid, ignored
+ // Host header (see https://go.dev/issue/61431).
+ //
+ // We don't preserve the truncation, because sending an altered
+ // header field opens a smuggling vector. Instead, zero out the
+ // Host header entirely if it isn't valid. (An empty Host is valid;
+ // see RFC 9112 Section 3.2.)
+ //
+ // Return an error if we're sending to a proxy, since the proxy
+ // probably can't do anything useful with an empty Host header.
+ if !usingProxy {
+ host = ""
+ } else {
+ return errors.New("http: invalid Host header")
+ }
}
// According to RFC 6874, an HTTP client, proxy, or other
diff --git a/src/net/http/request_test.go b/src/net/http/request_test.go
index fddc85d6a9..dd1e2dc2a1 100644
--- a/src/net/http/request_test.go
+++ b/src/net/http/request_test.go
@@ -770,16 +770,23 @@ func TestRequestWriteBufferedWriter(t *testing.T) {
}
}
-func TestRequestBadHost(t *testing.T) {
+func TestRequestBadHostHeader(t *testing.T) {
got := []string{}
req, err := NewRequest("GET", "http://foo/after", nil)
if err != nil {
t.Fatal(err)
}
- req.Host = "foo.com with spaces"
- req.URL.Host = "foo.com with spaces"
- if err := req.Write(logWrites{t, &got}); err == nil {
- t.Errorf("Writing request with invalid Host: succeded, want error")
+ req.Host = "foo.com\nnewline"
+ req.URL.Host = "foo.com\nnewline"
+ req.Write(logWrites{t, &got})
+ want := []string{
+ "GET /after HTTP/1.1\r\n",
+ "Host: \r\n",
+ "User-Agent: " + DefaultUserAgent + "\r\n",
+ "\r\n",
+ }
+ if !reflect.DeepEqual(got, want) {
+ t.Errorf("Writes = %q\n Want = %q", got, want)
}
}
--
2.34.1

View File

@@ -0,0 +1,121 @@
From 20586c0dbe03d144f914155f879fa5ee287591a1 Mon Sep 17 00:00:00 2001
From: Damien Neil <dneil@google.com>
Date: Thu, 11 Jan 2024 11:31:57 -0800
Subject: [PATCH] [release-branch.go1.21] net/http, net/http/cookiejar: avoid
subdomain matches on IPv6 zones
When deciding whether to forward cookies or sensitive headers
across a redirect, do not attempt to interpret an IPv6 address
as a domain name.
Avoids a case where a maliciously-crafted redirect to an
IPv6 address with a scoped addressing zone could be
misinterpreted as a within-domain redirect. For example,
we could interpret "::1%.www.example.com" as a subdomain
of "www.example.com".
Thanks to Juho Nurminen of Mattermost for reporting this issue.
Fixes CVE-2023-45289
Fixes #65385
For #65065
Change-Id: I8f463f59f0e700c8a18733d2b264a8bcb3a19599
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2131938
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Roland Shoemaker <bracewell@google.com>
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2173775
Reviewed-by: Carlos Amedee <amedee@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/569239
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Bypass: Michael Knyszek <mknyszek@google.com>
Upstream-Status: Backport [https://github.com/golang/go/commit/20586c0dbe03d144f914155f879fa5ee287591a1]
CVE: CVE-2023-45289
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
src/net/http/client.go | 6 ++++++
src/net/http/client_test.go | 1 +
src/net/http/cookiejar/jar.go | 7 +++++++
src/net/http/cookiejar/jar_test.go | 10 ++++++++++
4 files changed, 24 insertions(+)
diff --git a/src/net/http/client.go b/src/net/http/client.go
index a496f1c..2031834 100644
--- a/src/net/http/client.go
+++ b/src/net/http/client.go
@@ -973,6 +973,12 @@ func isDomainOrSubdomain(sub, parent string) bool {
if sub == parent {
return true
}
+ // If sub contains a :, it's probably an IPv6 address (and is definitely not a hostname).
+ // Don't check the suffix in this case, to avoid matching the contents of a IPv6 zone.
+ // For example, "::1%.www.example.com" is not a subdomain of "www.example.com".
+ if strings.ContainsAny(sub, ":%") {
+ return false
+ }
// If sub is "foo.example.com" and parent is "example.com",
// that means sub must end in "."+parent.
// Do it without allocating.
diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go
index 2b4f53f..442fe35 100644
--- a/src/net/http/client_test.go
+++ b/src/net/http/client_test.go
@@ -1703,6 +1703,7 @@ func TestShouldCopyHeaderOnRedirect(t *testing.T) {
{"cookie2", "http://foo.com/", "http://bar.com/", false},
{"authorization", "http://foo.com/", "http://bar.com/", false},
{"www-authenticate", "http://foo.com/", "http://bar.com/", false},
+ {"authorization", "http://foo.com/", "http://[::1%25.foo.com]/", false},
// But subdomains should work:
{"www-authenticate", "http://foo.com/", "http://foo.com/", true},
diff --git a/src/net/http/cookiejar/jar.go b/src/net/http/cookiejar/jar.go
index 9f19917..18cbfc2 100644
--- a/src/net/http/cookiejar/jar.go
+++ b/src/net/http/cookiejar/jar.go
@@ -356,6 +356,13 @@ func jarKey(host string, psl PublicSuffixList) string {
// isIP reports whether host is an IP address.
func isIP(host string) bool {
+ if strings.ContainsAny(host, ":%") {
+ // Probable IPv6 address.
+ // Hostnames can't contain : or %, so this is definitely not a valid host.
+ // Treating it as an IP is the more conservative option, and avoids the risk
+ // of interpeting ::1%.www.example.com as a subtomain of www.example.com.
+ return true
+ }
return net.ParseIP(host) != nil
}
diff --git a/src/net/http/cookiejar/jar_test.go b/src/net/http/cookiejar/jar_test.go
index 47fb1ab..fd8d40e 100644
--- a/src/net/http/cookiejar/jar_test.go
+++ b/src/net/http/cookiejar/jar_test.go
@@ -251,6 +251,7 @@ var isIPTests = map[string]bool{
"127.0.0.1": true,
"1.2.3.4": true,
"2001:4860:0:2001::68": true,
+ "::1%zone": true,
"example.com": false,
"1.1.1.300": false,
"www.foo.bar.net": false,
@@ -613,6 +614,15 @@ var basicsTests = [...]jarTest{
{"http://www.host.test:1234/", "a=1"},
},
},
+ {
+ "IPv6 zone is not treated as a host.",
+ "https://example.com/",
+ []string{"a=1"},
+ "a=1",
+ []query{
+ {"https://[::1%25.example.com]:80/", ""},
+ },
+ },
}
func TestBasics(t *testing.T) {
--
2.25.1

View File

@@ -0,0 +1,271 @@
From bf80213b121074f4ad9b449410a4d13bae5e9be0 Mon Sep 17 00:00:00 2001
From: Damien Neil <dneil@google.com>
Date: Tue, 16 Jan 2024 15:37:52 -0800
Subject: [PATCH] [release-branch.go1.21] net/textproto, mime/multipart: avoid
unbounded read in MIME header
mime/multipart.Reader.ReadForm allows specifying the maximum amount
of memory that will be consumed by the form. While this limit is
correctly applied to the parsed form data structure, it was not
being applied to individual header lines in a form.
For example, when presented with a form containing a header line
that never ends, ReadForm will continue to read the line until it
runs out of memory.
Limit the amount of data consumed when reading a header.
Fixes CVE-2023-45290
Fixes #65389
For #65383
Change-Id: I7f9264d25752009e95f6b2c80e3d76aaf321d658
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2134435
Reviewed-by: Roland Shoemaker <bracewell@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/2173776
Reviewed-by: Carlos Amedee <amedee@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/569240
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Upstream-Status: Backport [https://github.com/golang/go/commit/bf80213b121074f4ad9b449410a4d13bae5e9be0]
CVE: CVE-2023-45290
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
src/mime/multipart/formdata_test.go | 42 +++++++++++++++++++++++++
src/net/textproto/reader.go | 48 ++++++++++++++++++++---------
src/net/textproto/reader_test.go | 12 ++++++++
3 files changed, 87 insertions(+), 15 deletions(-)
diff --git a/src/mime/multipart/formdata_test.go b/src/mime/multipart/formdata_test.go
index c78eeb7..f729da6 100644
--- a/src/mime/multipart/formdata_test.go
+++ b/src/mime/multipart/formdata_test.go
@@ -421,6 +421,48 @@ func TestReadFormLimits(t *testing.T) {
}
}
+func TestReadFormEndlessHeaderLine(t *testing.T) {
+ for _, test := range []struct {
+ name string
+ prefix string
+ }{{
+ name: "name",
+ prefix: "X-",
+ }, {
+ name: "value",
+ prefix: "X-Header: ",
+ }, {
+ name: "continuation",
+ prefix: "X-Header: foo\r\n ",
+ }} {
+ t.Run(test.name, func(t *testing.T) {
+ const eol = "\r\n"
+ s := `--boundary` + eol
+ s += `Content-Disposition: form-data; name="a"` + eol
+ s += `Content-Type: text/plain` + eol
+ s += test.prefix
+ fr := io.MultiReader(
+ strings.NewReader(s),
+ neverendingReader('X'),
+ )
+ r := NewReader(fr, "boundary")
+ _, err := r.ReadForm(1 << 20)
+ if err != ErrMessageTooLarge {
+ t.Fatalf("ReadForm(1 << 20): %v, want ErrMessageTooLarge", err)
+ }
+ })
+ }
+}
+
+type neverendingReader byte
+
+func (r neverendingReader) Read(p []byte) (n int, err error) {
+ for i := range p {
+ p[i] = byte(r)
+ }
+ return len(p), nil
+}
+
func BenchmarkReadForm(b *testing.B) {
for _, test := range []struct {
name string
diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go
index ad2d777..cea6613 100644
--- a/src/net/textproto/reader.go
+++ b/src/net/textproto/reader.go
@@ -17,6 +17,10 @@ import (
"sync"
)
+// TODO: This should be a distinguishable error (ErrMessageTooLarge)
+// to allow mime/multipart to detect it.
+var errMessageTooLarge = errors.New("message too large")
+
// A Reader implements convenience methods for reading requests
// or responses from a text protocol network connection.
type Reader struct {
@@ -38,13 +42,13 @@ func NewReader(r *bufio.Reader) *Reader {
// ReadLine reads a single line from r,
// eliding the final \n or \r\n from the returned string.
func (r *Reader) ReadLine() (string, error) {
- line, err := r.readLineSlice()
+ line, err := r.readLineSlice(-1)
return string(line), err
}
// ReadLineBytes is like ReadLine but returns a []byte instead of a string.
func (r *Reader) ReadLineBytes() ([]byte, error) {
- line, err := r.readLineSlice()
+ line, err := r.readLineSlice(-1)
if line != nil {
buf := make([]byte, len(line))
copy(buf, line)
@@ -53,7 +57,10 @@ func (r *Reader) ReadLineBytes() ([]byte, error) {
return line, err
}
-func (r *Reader) readLineSlice() ([]byte, error) {
+// readLineSlice reads a single line from r,
+// up to lim bytes long (or unlimited if lim is less than 0),
+// eliding the final \r or \r\n from the returned string.
+func (r *Reader) readLineSlice(lim int64) ([]byte, error) {
r.closeDot()
var line []byte
for {
@@ -61,6 +68,9 @@ func (r *Reader) readLineSlice() ([]byte, error) {
if err != nil {
return nil, err
}
+ if lim >= 0 && int64(len(line))+int64(len(l)) > lim {
+ return nil, errMessageTooLarge
+ }
// Avoid the copy if the first call produced a full line.
if line == nil && !more {
return l, nil
@@ -93,7 +103,7 @@ func (r *Reader) readLineSlice() ([]byte, error) {
// A line consisting of only white space is never continued.
//
func (r *Reader) ReadContinuedLine() (string, error) {
- line, err := r.readContinuedLineSlice(noValidation)
+ line, err := r.readContinuedLineSlice(-1, noValidation)
return string(line), err
}
@@ -114,7 +124,7 @@ func trim(s []byte) []byte {
// ReadContinuedLineBytes is like ReadContinuedLine but
// returns a []byte instead of a string.
func (r *Reader) ReadContinuedLineBytes() ([]byte, error) {
- line, err := r.readContinuedLineSlice(noValidation)
+ line, err := r.readContinuedLineSlice(-1, noValidation)
if line != nil {
buf := make([]byte, len(line))
copy(buf, line)
@@ -127,13 +137,14 @@ func (r *Reader) ReadContinuedLineBytes() ([]byte, error) {
// returning a byte slice with all lines. The validateFirstLine function
// is run on the first read line, and if it returns an error then this
// error is returned from readContinuedLineSlice.
-func (r *Reader) readContinuedLineSlice(validateFirstLine func([]byte) error) ([]byte, error) {
+// It reads up to lim bytes of data (or unlimited if lim is less than 0).
+func (r *Reader) readContinuedLineSlice(lim int64, validateFirstLine func([]byte) error) ([]byte, error) {
if validateFirstLine == nil {
return nil, fmt.Errorf("missing validateFirstLine func")
}
// Read the first line.
- line, err := r.readLineSlice()
+ line, err := r.readLineSlice(lim)
if err != nil {
return nil, err
}
@@ -161,13 +172,21 @@ func (r *Reader) readContinuedLineSlice(validateFirstLine func([]byte) error) ([
// copy the slice into buf.
r.buf = append(r.buf[:0], trim(line)...)
+ if lim < 0 {
+ lim = math.MaxInt64
+ }
+ lim -= int64(len(r.buf))
+
// Read continuation lines.
for r.skipSpace() > 0 {
- line, err := r.readLineSlice()
+ r.buf = append(r.buf, ' ')
+ if int64(len(r.buf)) >= lim {
+ return nil, errMessageTooLarge
+ }
+ line, err := r.readLineSlice(lim - int64(len(r.buf)))
if err != nil {
break
}
- r.buf = append(r.buf, ' ')
r.buf = append(r.buf, trim(line)...)
}
return r.buf, nil
@@ -512,7 +531,8 @@ func readMIMEHeader(r *Reader, maxMemory, maxHeaders int64) (MIMEHeader, error)
// The first line cannot start with a leading space.
if buf, err := r.R.Peek(1); err == nil && (buf[0] == ' ' || buf[0] == '\t') {
- line, err := r.readLineSlice()
+ const errorLimit = 80 // arbitrary limit on how much of the line we'll quote
+ line, err := r.readLineSlice(errorLimit)
if err != nil {
return m, err
}
@@ -520,7 +540,7 @@ func readMIMEHeader(r *Reader, maxMemory, maxHeaders int64) (MIMEHeader, error)
}
for {
- kv, err := r.readContinuedLineSlice(mustHaveFieldNameColon)
+ kv, err := r.readContinuedLineSlice(maxMemory, mustHaveFieldNameColon)
if len(kv) == 0 {
return m, err
}
@@ -541,7 +561,7 @@ func readMIMEHeader(r *Reader, maxMemory, maxHeaders int64) (MIMEHeader, error)
maxHeaders--
if maxHeaders < 0 {
- return nil, errors.New("message too large")
+ return nil, errMessageTooLarge
}
// backport 5c55ac9bf1e5f779220294c843526536605f42ab
@@ -567,9 +587,7 @@ func readMIMEHeader(r *Reader, maxMemory, maxHeaders int64) (MIMEHeader, error)
}
maxMemory -= int64(len(value))
if maxMemory < 0 {
- // TODO: This should be a distinguishable error (ErrMessageTooLarge)
- // to allow mime/multipart to detect it.
- return m, errors.New("message too large")
+ return m, errMessageTooLarge
}
if vv == nil && len(strs) > 0 {
// More than likely this will be a single-element key.
diff --git a/src/net/textproto/reader_test.go b/src/net/textproto/reader_test.go
index 3ae0de1..db1ed91 100644
--- a/src/net/textproto/reader_test.go
+++ b/src/net/textproto/reader_test.go
@@ -34,6 +34,18 @@ func TestReadLine(t *testing.T) {
}
}
+func TestReadLineLongLine(t *testing.T) {
+ line := strings.Repeat("12345", 10000)
+ r := reader(line + "\r\n")
+ s, err := r.ReadLine()
+ if err != nil {
+ t.Fatalf("Line 1: %v", err)
+ }
+ if s != line {
+ t.Fatalf("%v-byte line does not match expected %v-byte line", len(s), len(line))
+ }
+}
+
func TestReadContinuedLine(t *testing.T) {
r := reader("line1\nline\n 2\nline3\n")
s, err := r.ReadContinuedLine()
--
2.25.1

View File

@@ -0,0 +1,205 @@
From 5330cd225ba54c7dc78c1b46dcdf61a4671a632c Mon Sep 17 00:00:00 2001
From: Roland Shoemaker <bracewell@google.com>
Date: Wed, 10 Jan 2024 11:02:14 -0800
Subject: [PATCH] [release-branch.go1.22] net/mail: properly handle special
characters in phrase and obs-phrase
Fixes a couple of misalignments with RFC 5322 which introduce
significant diffs between (mostly) conformant parsers.
This change reverts the changes made in CL50911, which allowed certain
special RFC 5322 characters to appear unquoted in the "phrase" syntax.
It is unclear why this change was made in the first place, and created
a divergence from comformant parsers. In particular this resulted in
treating comments in display names incorrectly.
Additionally properly handle trailing malformed comments in the group
syntax.
For #65083
Fixed #65849
Change-Id: I00dddc044c6ae3381154e43236632604c390f672
Reviewed-on: https://go-review.googlesource.com/c/go/+/555596
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/566215
Reviewed-by: Carlos Amedee <carlos@golang.org>
Upstream-Status: Backport [https://github.com/golang/go/commit/5330cd225ba54c7dc78c1b46dcdf61a4671a632c]
CVE: CVE-2024-24784
Signed-off-by: Ashish Sharma <asharma@mvista.com>
src/net/mail/message.go | 30 +++++++++++++++------------
src/net/mail/message_test.go | 40 ++++++++++++++++++++++++++----------
2 files changed, 46 insertions(+), 24 deletions(-)
diff --git a/src/net/mail/message.go b/src/net/mail/message.go
index af516fc30f470..fc2a9e46f811b 100644
--- a/src/net/mail/message.go
+++ b/src/net/mail/message.go
@@ -280,7 +280,7 @@ func (a *Address) String() string {
// Add quotes if needed
quoteLocal := false
for i, r := range local {
- if isAtext(r, false, false) {
+ if isAtext(r, false) {
continue
}
if r == '.' {
@@ -444,7 +444,7 @@ func (p *addrParser) parseAddress(handleGroup bool) ([]*Address, error) {
if !p.consume('<') {
atext := true
for _, r := range displayName {
- if !isAtext(r, true, false) {
+ if !isAtext(r, true) {
atext = false
break
}
@@ -479,7 +479,9 @@ func (p *addrParser) consumeGroupList() ([]*Address, error) {
// handle empty group.
p.skipSpace()
if p.consume(';') {
- p.skipCFWS()
+ if !p.skipCFWS() {
+ return nil, errors.New("mail: misformatted parenthetical comment")
+ }
return group, nil
}
@@ -496,7 +498,9 @@ func (p *addrParser) consumeGroupList() ([]*Address, error) {
return nil, errors.New("mail: misformatted parenthetical comment")
}
if p.consume(';') {
- p.skipCFWS()
+ if !p.skipCFWS() {
+ return nil, errors.New("mail: misformatted parenthetical comment")
+ }
break
}
if !p.consume(',') {
@@ -566,6 +570,12 @@ func (p *addrParser) consumePhrase() (phrase string, err error) {
var words []string
var isPrevEncoded bool
for {
+ // obs-phrase allows CFWS after one word
+ if len(words) > 0 {
+ if !p.skipCFWS() {
+ return "", errors.New("mail: misformatted parenthetical comment")
+ }
+ }
// word = atom / quoted-string
var word string
p.skipSpace()
@@ -661,7 +671,6 @@ Loop:
// If dot is true, consumeAtom parses an RFC 5322 dot-atom instead.
// If permissive is true, consumeAtom will not fail on:
// - leading/trailing/double dots in the atom (see golang.org/issue/4938)
-// - special characters (RFC 5322 3.2.3) except '<', '>', ':' and '"' (see golang.org/issue/21018)
func (p *addrParser) consumeAtom(dot bool, permissive bool) (atom string, err error) {
i := 0
@@ -672,7 +681,7 @@ Loop:
case size == 1 && r == utf8.RuneError:
return "", fmt.Errorf("mail: invalid utf-8 in address: %q", p.s)
- case size == 0 || !isAtext(r, dot, permissive):
+ case size == 0 || !isAtext(r, dot):
break Loop
default:
@@ -850,18 +859,13 @@ func (e charsetError) Error() string {
// isAtext reports whether r is an RFC 5322 atext character.
// If dot is true, period is included.
-// If permissive is true, RFC 5322 3.2.3 specials is included,
-// except '<', '>', ':' and '"'.
-func isAtext(r rune, dot, permissive bool) bool {
+func isAtext(r rune, dot bool) bool {
switch r {
case '.':
return dot
// RFC 5322 3.2.3. specials
- case '(', ')', '[', ']', ';', '@', '\\', ',':
- return permissive
-
- case '<', '>', '"', ':':
+ case '(', ')', '<', '>', '[', ']', ':', ';', '@', '\\', ',', '"': // RFC 5322 3.2.3. specials
return false
}
return isVchar(r)
diff --git a/src/net/mail/message_test.go b/src/net/mail/message_test.go
index 1e1bb4092f659..1f2f62afbf406 100644
--- a/src/net/mail/message_test.go
+++ b/src/net/mail/message_test.go
@@ -385,8 +385,11 @@ func TestAddressParsingError(t *testing.T) {
13: {"group not closed: null@example.com", "expected comma"},
14: {"group: first@example.com, second@example.com;", "group with multiple addresses"},
15: {"john.doe", "missing '@' or angle-addr"},
- 16: {"john.doe@", "no angle-addr"},
+ 16: {"john.doe@", "missing '@' or angle-addr"},
17: {"John Doe@foo.bar", "no angle-addr"},
+ 18: {" group: null@example.com; (asd", "misformatted parenthetical comment"},
+ 19: {" group: ; (asd", "misformatted parenthetical comment"},
+ 20: {`(John) Doe <jdoe@machine.example>`, "missing word in phrase:"},
}
for i, tc := range mustErrTestCases {
@@ -436,24 +439,19 @@ func TestAddressParsing(t *testing.T) {
Address: "john.q.public@example.com",
}},
},
- {
- `"John (middle) Doe" <jdoe@machine.example>`,
- []*Address{{
- Name: "John (middle) Doe",
- Address: "jdoe@machine.example",
- }},
- },
+ // Comment in display name
{
`John (middle) Doe <jdoe@machine.example>`,
[]*Address{{
- Name: "John (middle) Doe",
+ Name: "John Doe",
Address: "jdoe@machine.example",
}},
},
+ // Display name is quoted string, so comment is not a comment
{
- `John !@M@! Doe <jdoe@machine.example>`,
+ `"John (middle) Doe" <jdoe@machine.example>`,
[]*Address{{
- Name: "John !@M@! Doe",
+ Name: "John (middle) Doe",
Address: "jdoe@machine.example",
}},
},
@@ -788,6 +786,26 @@ func TestAddressParsing(t *testing.T) {
},
},
},
+ // Comment in group display name
+ {
+ `group (comment:): a@example.com, b@example.com;`,
+ []*Address{
+ {
+ Address: "a@example.com",
+ },
+ {
+ Address: "b@example.com",
+ },
+ },
+ },
+ {
+ `x(:"):"@a.example;("@b.example;`,
+ []*Address{
+ {
+ Address: `@a.example;(@b.example`,
+ },
+ },
+ },
}
for _, test := range tests {
if len(test.exp) == 1 {

View File

@@ -0,0 +1,197 @@
From 3643147a29352ca2894fd5d0d2069bc4b4335a7e Mon Sep 17 00:00:00 2001
From: Roland Shoemaker <roland@golang.org>
Date: Wed, 14 Feb 2024 17:18:36 -0800
Subject: [PATCH] [release-branch.go1.21] html/template: escape additional
tokens in MarshalJSON errors
Escape "</script" and "<!--" in errors returned from MarshalJSON errors
when attempting to marshal types in script blocks. This prevents any
user controlled content from prematurely terminating the script block.
Updates #65697
Fixes #65968
Change-Id: Icf0e26c54ea7d9c1deed0bff11b6506c99ddef1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/564196
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
(cherry picked from commit ccbc725f2d678255df1bd326fa511a492aa3a0aa)
Reviewed-on: https://go-review.googlesource.com/c/go/+/567515
Reviewed-by: Carlos Amedee <carlos@golang.org>
Upstream-Status: Backport [https://github.com/golang/go/commit/3643147a29352ca2894fd5d0d2069bc4b4335a7e]
CVE: CVE-2024-24785
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
src/html/template/js.go | 22 ++++++++-
src/html/template/js_test.go | 96 ++++++++++++++++++++----------------
2 files changed, 74 insertions(+), 44 deletions(-)
diff --git a/src/html/template/js.go b/src/html/template/js.go
index 35994f0..4d3b25d 100644
--- a/src/html/template/js.go
+++ b/src/html/template/js.go
@@ -171,13 +171,31 @@ func jsValEscaper(args ...interface{}) string {
// cyclic data. This may be an unacceptable DoS risk.
b, err := json.Marshal(a)
if err != nil {
- // Put a space before comment so that if it is flush against
+ // While the standard JSON marshaller does not include user controlled
+ // information in the error message, if a type has a MarshalJSON method,
+ // the content of the error message is not guaranteed. Since we insert
+ // the error into the template, as part of a comment, we attempt to
+ // prevent the error from either terminating the comment, or the script
+ // block itself.
+ //
+ // In particular we:
+ // * replace "*/" comment end tokens with "* /", which does not
+ // terminate the comment
+ // * replace "</script" with "\x3C/script", and "<!--" with
+ // "\x3C!--", which prevents confusing script block termination
+ // semantics
+ //
+ // We also put a space before the comment so that if it is flush against
// a division operator it is not turned into a line comment:
// x/{{y}}
// turning into
// x//* error marshaling y:
// second line of error message */null
- return fmt.Sprintf(" /* %s */null ", strings.ReplaceAll(err.Error(), "*/", "* /"))
+ errStr := err.Error()
+ errStr = strings.ReplaceAll(errStr, "*/", "* /")
+ errStr = strings.ReplaceAll(errStr, "</script", `\x3C/script`)
+ errStr = strings.ReplaceAll(errStr, "<!--", `\x3C!--`)
+ return fmt.Sprintf(" /* %s */null ", errStr)
}
// TODO: maybe post-process output to prevent it from containing
diff --git a/src/html/template/js_test.go b/src/html/template/js_test.go
index de9ef28..3fc3baf 100644
--- a/src/html/template/js_test.go
+++ b/src/html/template/js_test.go
@@ -5,6 +5,7 @@
package template
import (
+ "errors"
"bytes"
"math"
"strings"
@@ -104,61 +105,72 @@ func TestNextJsCtx(t *testing.T) {
}
}
+type jsonErrType struct{}
+
+func (e *jsonErrType) MarshalJSON() ([]byte, error) {
+ return nil, errors.New("beep */ boop </script blip <!--")
+}
+
func TestJSValEscaper(t *testing.T) {
tests := []struct {
- x interface{}
- js string
+ x interface{}
+ js string
+ skipNest bool
}{
- {int(42), " 42 "},
- {uint(42), " 42 "},
- {int16(42), " 42 "},
- {uint16(42), " 42 "},
- {int32(-42), " -42 "},
- {uint32(42), " 42 "},
- {int16(-42), " -42 "},
- {uint16(42), " 42 "},
- {int64(-42), " -42 "},
- {uint64(42), " 42 "},
- {uint64(1) << 53, " 9007199254740992 "},
+ {int(42), " 42 ", false},
+ {uint(42), " 42 ", false},
+ {int16(42), " 42 ", false},
+ {uint16(42), " 42 ", false},
+ {int32(-42), " -42 ", false},
+ {uint32(42), " 42 ", false},
+ {int16(-42), " -42 ", false},
+ {uint16(42), " 42 ", false},
+ {int64(-42), " -42 ", false},
+ {uint64(42), " 42 ", false},
+ {uint64(1) << 53, " 9007199254740992 ", false},
// ulp(1 << 53) > 1 so this loses precision in JS
// but it is still a representable integer literal.
- {uint64(1)<<53 + 1, " 9007199254740993 "},
- {float32(1.0), " 1 "},
- {float32(-1.0), " -1 "},
- {float32(0.5), " 0.5 "},
- {float32(-0.5), " -0.5 "},
- {float32(1.0) / float32(256), " 0.00390625 "},
- {float32(0), " 0 "},
- {math.Copysign(0, -1), " -0 "},
- {float64(1.0), " 1 "},
- {float64(-1.0), " -1 "},
- {float64(0.5), " 0.5 "},
- {float64(-0.5), " -0.5 "},
- {float64(0), " 0 "},
- {math.Copysign(0, -1), " -0 "},
- {"", `""`},
- {"foo", `"foo"`},
+ {uint64(1)<<53 + 1, " 9007199254740993 ", false},
+ {float32(1.0), " 1 ", false},
+ {float32(-1.0), " -1 ", false},
+ {float32(0.5), " 0.5 ", false},
+ {float32(-0.5), " -0.5 ", false},
+ {float32(1.0) / float32(256), " 0.00390625 ", false},
+ {float32(0), " 0 ", false},
+ {math.Copysign(0, -1), " -0 ", false},
+ {float64(1.0), " 1 ", false},
+ {float64(-1.0), " -1 ", false},
+ {float64(0.5), " 0.5 ", false},
+ {float64(-0.5), " -0.5 ", false},
+ {float64(0), " 0 ", false},
+ {math.Copysign(0, -1), " -0 ", false},
+ {"", `""`, false},
+ {"foo", `"foo"`, false},
// Newlines.
- {"\r\n\u2028\u2029", `"\r\n\u2028\u2029"`},
+ {"\r\n\u2028\u2029", `"\r\n\u2028\u2029"`, false},
// "\v" == "v" on IE 6 so use "\u000b" instead.
- {"\t\x0b", `"\t\u000b"`},
- {struct{ X, Y int }{1, 2}, `{"X":1,"Y":2}`},
- {[]interface{}{}, "[]"},
- {[]interface{}{42, "foo", nil}, `[42,"foo",null]`},
- {[]string{"<!--", "</script>", "-->"}, `["\u003c!--","\u003c/script\u003e","--\u003e"]`},
- {"<!--", `"\u003c!--"`},
- {"-->", `"--\u003e"`},
- {"<![CDATA[", `"\u003c![CDATA["`},
- {"]]>", `"]]\u003e"`},
- {"</script", `"\u003c/script"`},
- {"\U0001D11E", "\"\U0001D11E\""}, // or "\uD834\uDD1E"
- {nil, " null "},
+ {"\t\x0b", `"\t\u000b"`, false},
+ {struct{ X, Y int }{1, 2}, `{"X":1,"Y":2}`, false},
+ {[]interface{}{}, "[]", false},
+ {[]interface{}{42, "foo", nil}, `[42,"foo",null]`, false},
+ {[]string{"<!--", "</script>", "-->"}, `["\u003c!--","\u003c/script\u003e","--\u003e"]`, false},
+ {"<!--", `"\u003c!--"`, false},
+ {"-->", `"--\u003e"`, false},
+ {"<![CDATA[", `"\u003c![CDATA["`, false},
+ {"]]>", `"]]\u003e"`, false},
+ {"</script", `"\u003c/script"`, false},
+ {"\U0001D11E", "\"\U0001D11E\"", false}, // or "\uD834\uDD1E"
+ {nil, " null ", false},
+ {&jsonErrType{}, " /* json: error calling MarshalJSON for type *template.jsonErrType: beep * / boop \\x3C/script blip \\x3C!-- */null ", true},
}
for _, test := range tests {
if js := jsValEscaper(test.x); js != test.js {
t.Errorf("%+v: want\n\t%q\ngot\n\t%q", test.x, test.js, js)
}
+ if test.skipNest {
+ continue
+ }
// Make sure that escaping corner cases are not broken
// by nesting.
a := []interface{}{test.x}
--
2.25.1

View File

@@ -0,0 +1,50 @@
From 8b45a3c4cab95382beea1ecdddeb2e4a9ed14aba Mon Sep 17 00:00:00 2001
From: Jo-Philipp Wich <jo@mein.io>
Date: Wed, 1 Apr 2020 21:47:40 +0200
Subject: [PATCH 001/104] file_util.c: fix possible bad memory access 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. Also change the unsigned int types to size_t to store length values
while we're at it.
Upstream-Status: Backport [https://github.com/ndmsystems/opkg/commit/8b45a3c4cab95382beea1ecdddeb2e4a9ed14aba]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Signed-off-by: virendra thakur <virendrak@kpit.com>
---
libopkg/file_util.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libopkg/file_util.c b/libopkg/file_util.c
index fbed7b4..ee9f59d 100644
--- a/libopkg/file_util.c
+++ b/libopkg/file_util.c
@@ -127,17 +127,14 @@ char *file_readlink_alloc(const char *file_name)
*/
char *file_read_line_alloc(FILE * fp)
{
+ size_t buf_len, line_size;
char buf[BUFSIZ];
- unsigned int buf_len;
char *line = NULL;
- unsigned int line_size = 0;
int got_nl = 0;
- buf[0] = '\0';
-
while (fgets(buf, BUFSIZ, fp)) {
buf_len = strlen(buf);
- if (buf[buf_len - 1] == '\n') {
+ if (buf_len > 0 && buf[buf_len - 1] == '\n') {
buf_len--;
buf[buf_len] = '\0';
got_nl = 1;
--
2.25.1

View File

@@ -16,6 +16,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
file://opkg.conf \
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
file://sourcedateepoch.patch \
file://0001-file_util.c-fix-possible-bad-memory-access-in-file_r.patch \
file://run-ptest \
"

View File

@@ -46,6 +46,10 @@ SRC_URI[perl-cross.sha256sum] = "edce0b0c2f725e2db3f203d6d8e9f3f7161256f5d159055
S = "${WORKDIR}/perl-${PV}"
# This is windows only issue.
# https://ubuntu.com/security/CVE-2023-47039
CVE_CHECK_WHITELIST += "CVE-2023-47039"
inherit upstream-version-is-even update-alternatives
DEPENDS += "zlib virtual/crypt"

View File

@@ -0,0 +1,31 @@
From fabef23bea6e9963c06e218586fda1a823e3c6bf Mon Sep 17 00:00:00 2001
From: Wayne Davison <wayne@opencoder.net>
Date: Mon, 8 Aug 2022 21:30:21 -0700
Subject: [PATCH] Fix --relative when copying an absolute path.
CVE: CVE-2022-29154
Upstream-Status: Backport [https://github.com/WayneD/rsync/commit/fabef23bea6e9963c06e218586fda1a823e3c6bf]
Signed-off-by: Matthias Schmitz <matthias.schmitz@port4949.net>
---
exclude.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/exclude.c b/exclude.c
index 2394023f..ba5ca5a3 100644
--- a/exclude.c
+++ b/exclude.c
@@ -434,8 +434,10 @@ void add_implied_include(const char *arg)
*p++ = *cp++;
break;
case '/':
- if (p[-1] == '/') /* This is safe because of the initial slash. */
+ if (p[-1] == '/') { /* This is safe because of the initial slash. */
+ cp++;
break;
+ }
if (relative_paths) {
filter_rule const *ent;
int found = 0;
--
2.39.2

View File

@@ -17,6 +17,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
file://CVE-2016-9842.patch \
file://CVE-2016-9843.patch \
file://CVE-2022-29154.patch \
file://0001-Fix-relative-when-copying-an-absolute-path.patch \
"
SRC_URI[md5sum] = "1581a588fde9d89f6bc6201e8129afaf"

View File

@@ -1,3 +1,4 @@
drd/tests/bar_bad
drd/tests/bar_bad_xml
gdbserver_tests/hginfo
memcheck/tests/linux/timerfd-syscall

View File

@@ -0,0 +1,109 @@
From 8c7bd787defa071c96289b7da9397f673fddb874 Mon Sep 17 00:00:00 2001
From: Ken Sharp <ken.sharp@artifex.com>
Date: Wed, 20 May 2020 16:02:07 +0100
Subject: [PATCH] txtwrite - address memory problems
Bug #702229 " txtwrite: use after free in 9.51 on some files (regression from 9.50)"
Also bug #702346 and the earlier report #701877.
The problems occur because its possible for a single character code in
a PDF file to map to more than a single Unicode code point. In the case
of the file for 701877 the character code maps to 'f' and 'i' (it is an
fi ligature).
The code should deal with this, but we need to ensure we are using the
correct index. In addition, if we do get more Unicode code points than
we expected, we need to set the widths of the 'extra' code points to
zero (we only want to consider the width of the original character).
This does mean increasing the size of the Widths array to cater for
the possibility of more entries on output than there were on input.
While working on it I noticed that the Unicode remapping on little-
endian machines was reversing the order of the Unicode values, when
there was more than a single code point returned, so fixed that at
the same time.
Upstream-Status: Backport [https://git.ghostscript.com/?p=ghostpdl.git;h=8c7bd787defa071c96289b7da9397f673fddb874]
CVE: CVE-2020-36773
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
devices/vector/gdevtxtw.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/devices/vector/gdevtxtw.c b/devices/vector/gdevtxtw.c
index 87f9355..bddce5a 100644
--- a/devices/vector/gdevtxtw.c
+++ b/devices/vector/gdevtxtw.c
@@ -1812,11 +1812,11 @@ static int get_unicode(textw_text_enum_t *penum, gs_font *font, gs_glyph glyph,
#else
b = (char *)Buffer;
u = (char *)unicode;
- while (l >= 0) {
- *b++ = *(u + l);
- l--;
- }
+ for (l=0;l<length;l+=2, u+=2){
+ *b++ = *(u+1);
+ *b++ = *u;
+ }
#endif
gs_free_object(penum->dev->memory, unicode, "free temporary unicode buffer");
return length / sizeof(short);
@@ -1963,7 +1963,7 @@ txtwrite_process_plain_text(gs_text_enum_t *pte)
&penum->text_state->matrix, &wanted);
pte->returned.total_width.x += wanted.x;
pte->returned.total_width.y += wanted.y;
- penum->Widths[pte->index - 1] = wanted.x;
+ penum->Widths[penum->TextBufferIndex] = wanted.x;
if (pte->text.operation & TEXT_ADD_TO_ALL_WIDTHS) {
gs_point tpt;
@@ -1984,8 +1984,14 @@ txtwrite_process_plain_text(gs_text_enum_t *pte)
pte->returned.total_width.x += dpt.x;
pte->returned.total_width.y += dpt.y;
- penum->TextBufferIndex += get_unicode(penum, (gs_font *)pte->orig_font, glyph, ch, &penum->TextBuffer[penum->TextBufferIndex]);
- penum->Widths[pte->index - 1] += dpt.x;
+ penum->Widths[penum->TextBufferIndex] += dpt.x;
+ code = get_unicode(penum, (gs_font *)pte->orig_font, glyph, ch, &penum->TextBuffer[penum->TextBufferIndex]);
+ /* If a single text code returned multiple Unicode values, then we need to set the
+ * 'extra' code points' widths to 0.
+ */
+ if (code > 1)
+ memset(&penum->Widths[penum->TextBufferIndex + 1], 0x00, (code - 1) * sizeof(float));
+ penum->TextBufferIndex += code;
}
return 0;
}
@@ -2123,7 +2129,7 @@ txt_add_fragment(gx_device_txtwrite_t *tdev, textw_text_enum_t *penum)
if (!penum->text_state->Widths)
return gs_note_error(gs_error_VMerror);
memset(penum->text_state->Widths, 0x00, penum->TextBufferIndex * sizeof(float));
- memcpy(penum->text_state->Widths, penum->Widths, penum->text.size * sizeof(float));
+ memcpy(penum->text_state->Widths, penum->Widths, penum->TextBufferIndex * sizeof(float));
unsorted_entry->Unicode_Text = (unsigned short *)gs_malloc(tdev->memory->stable_memory,
penum->TextBufferIndex, sizeof(unsigned short), "txtwrite alloc sorted text buffer");
@@ -2136,7 +2142,7 @@ txt_add_fragment(gx_device_txtwrite_t *tdev, textw_text_enum_t *penum)
if (!unsorted_entry->Widths)
return gs_note_error(gs_error_VMerror);
memset(unsorted_entry->Widths, 0x00, penum->TextBufferIndex * sizeof(float));
- memcpy(unsorted_entry->Widths, penum->Widths, penum->text.size * sizeof(float));
+ memcpy(unsorted_entry->Widths, penum->Widths, penum->TextBufferIndex * sizeof(float));
unsorted_entry->FontName = (char *)gs_malloc(tdev->memory->stable_memory,
(strlen(penum->text_state->FontName) + 1), sizeof(unsigned char), "txtwrite alloc sorted text buffer");
@@ -2192,7 +2198,7 @@ textw_text_process(gs_text_enum_t *pte)
if (!penum->TextBuffer)
return gs_note_error(gs_error_VMerror);
penum->Widths = (float *)gs_malloc(tdev->memory->stable_memory,
- pte->text.size, sizeof(float), "txtwrite temporary widths array");
+ pte->text.size * 4, sizeof(float), "txtwrite temporary widths array");
if (!penum->Widths)
return gs_note_error(gs_error_VMerror);
}
--
2.25.1

View File

@@ -45,6 +45,7 @@ SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/d
file://CVE-2023-36664-1.patch \
file://CVE-2023-36664-2.patch \
file://CVE-2023-43115.patch \
file://CVE-2020-36773.patch \
"
SRC_URI = "${SRC_URI_BASE} \

View File

@@ -0,0 +1,41 @@
From c6ac6de49698be84d264a0c4c0c40bb870b10144 Mon Sep 17 00:00:00 2001
From: Mark Nudelman <markn@greenwoodsoftware.com>
Date: Sat, 25 Jun 2022 11:54:43 -0700
Subject: [PATCH] Shell-quote filenames when invoking LESSCLOSE.
Upstream-Status: Backport [https://github.com/gwsw/less/commit/c6ac6de49698be84d264a0c4c0c40bb870b10144]
CVE: CVE-2022-48624
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
filename.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/filename.c b/filename.c
index 5824e385..dff20c08 100644
--- a/filename.c
+++ b/filename.c
@@ -972,6 +972,8 @@ close_altfile(altfilename, filename)
{
#if HAVE_POPEN
char *lessclose;
+ char *qfilename;
+ char *qaltfilename;
FILE *fd;
char *cmd;
int len;
@@ -986,9 +988,13 @@ close_altfile(altfilename, filename)
error("LESSCLOSE ignored; must contain no more than 2 %%s", NULL_PARG);
return;
}
- len = (int) (strlen(lessclose) + strlen(filename) + strlen(altfilename) + 2);
+ qfilename = shell_quote(filename);
+ qaltfilename = shell_quote(altfilename);
+ len = (int) (strlen(lessclose) + strlen(qfilename) + strlen(qaltfilename) + 2);
cmd = (char *) ecalloc(len, sizeof(char));
- SNPRINTF2(cmd, len, lessclose, filename, altfilename);
+ SNPRINTF2(cmd, len, lessclose, qfilename, qaltfilename);
+ free(qaltfilename);
+ free(qfilename);
fd = shellcmd(cmd);
free(cmd);
if (fd != NULL)

View File

@@ -26,6 +26,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
DEPENDS = "ncurses"
SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
file://CVE-2022-48624.patch \
"
SRC_URI[md5sum] = "4ad4408b06d7a6626a055cb453f36819"

View File

@@ -0,0 +1,59 @@
From 031bb5a5d0d950253b68138b498dc93be69a64cb Mon Sep 17 00:00:00 2001
From: Matthias Gerstner <matthias.gerstner@suse.de>
Date: Wed, 27 Dec 2023 14:01:59 +0100
Subject: [PATCH] pam_namespace: protect_dir(): use O_DIRECTORY to prevent
local DoS situations
Without O_DIRECTORY the path crawling logic is subject to e.g. FIFOs
being placed in user controlled directories, causing the PAM module to
block indefinitely during `openat()`.
Pass O_DIRECTORY to cause the `openat()` to fail if the path does not
refer to a directory.
With this the check whether the final path element is a directory
becomes unnecessary, drop it.
Upstream-Status: Backport [https://github.com/linux-pam/linux-pam/commit/031bb5a5d0d950253b68138b498dc93be69a64cb]
CVE: CVE-2024-22365
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
modules/pam_namespace/pam_namespace.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
index 2528cff86..f72d67189 100644
--- a/modules/pam_namespace/pam_namespace.c
+++ b/modules/pam_namespace/pam_namespace.c
@@ -1201,7 +1201,7 @@ static int protect_dir(const char *path, mode_t mode, int do_mkdir,
int dfd = AT_FDCWD;
int dfd_next;
int save_errno;
- int flags = O_RDONLY;
+ int flags = O_RDONLY | O_DIRECTORY;
int rv = -1;
struct stat st;
@@ -1255,22 +1255,6 @@ static int protect_dir(const char *path, mode_t mode, int do_mkdir,
rv = openat(dfd, dir, flags);
}
- if (rv != -1) {
- if (fstat(rv, &st) != 0) {
- save_errno = errno;
- close(rv);
- rv = -1;
- errno = save_errno;
- goto error;
- }
- if (!S_ISDIR(st.st_mode)) {
- close(rv);
- errno = ENOTDIR;
- rv = -1;
- goto error;
- }
- }
-
if (flags & O_NOFOLLOW) {
/* we are inside user-owned dir - protect */
if (protect_mount(rv, p, idata) == -1) {

View File

@@ -24,6 +24,7 @@ SRC_URI = "https://github.com/linux-pam/linux-pam/releases/download/v${PV}/Linux
file://pam-security-abstract-securetty-handling.patch \
file://pam-unix-nullok-secure.patch \
file://crypt_configure.patch \
file://CVE-2024-22365.patch \
"
SRC_URI[md5sum] = "558ff53b0fc0563ca97f79e911822165"

View File

@@ -0,0 +1,146 @@
From 51731b01fd9a608397da22b7b9164e4996f3d4c6 Mon Sep 17 00:00:00 2001
From: Alejandro Colomar <alx@kernel.org>
Date: Sat, 10 Jun 2023 16:20:05 +0200
Subject: [PATCH] gpasswd(1): Fix password leak
CVE: CVE-2023-4641
Upstream-Status: Backport [https://github.com/shadow-maint/shadow/commit/65c88a43a23c2391dcc90c0abda3e839e9c57904]
How to trigger this password leak?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When gpasswd(1) asks for the new password, it asks twice (as is usual
for confirming the new password). Each of those 2 password prompts
uses agetpass() to get the password. If the second agetpass() fails,
the first password, which has been copied into the 'static' buffer
'pass' via STRFCPY(), wasn't being zeroed.
agetpass() is defined in <./libmisc/agetpass.c> (around line 91), and
can fail for any of the following reasons:
- malloc(3) or readpassphrase(3) failure.
These are going to be difficult to trigger. Maybe getting the system
to the limits of memory utilization at that exact point, so that the
next malloc(3) gets ENOMEM, and possibly even the OOM is triggered.
About readpassphrase(3), ENFILE and EINTR seem the only plausible
ones, and EINTR probably requires privilege or being the same user;
but I wouldn't discard ENFILE so easily, if a process starts opening
files.
- The password is longer than PASS_MAX.
The is plausible with physical access. However, at that point, a
keylogger will be a much simpler attack.
And, the attacker must be able to know when the second password is being
introduced, which is not going to be easy.
How to read the password after the leak?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provoking the leak yourself at the right point by entering a very long
password is easy, and inspecting the process stack at that point should
be doable. Try to find some consistent patterns.
Then, search for those patterns in free memory, right after the victim
leaks their password.
Once you get the leak, a program should read all the free memory
searching for patterns that gpasswd(1) leaves nearby the leaked
password.
On 6/10/23 03:14, Seth Arnold wrote:
> An attacker process wouldn't be able to use malloc(3) for this task.
> There's a handful of tools available for userspace to allocate memory:
>
> - brk / sbrk
> - mmap MAP_ANONYMOUS
> - mmap /dev/zero
> - mmap some other file
> - shm_open
> - shmget
>
> Most of these return only pages of zeros to a process. Using mmap of an
> existing file, you can get some of the contents of the file demand-loaded
> into the memory space on the first use.
>
> The MAP_UNINITIALIZED flag only works if the kernel was compiled with
> CONFIG_MMAP_ALLOW_UNINITIALIZED. This is rare.
>
> malloc(3) doesn't zero memory, to our collective frustration, but all the
> garbage in the allocations is from previous allocations in the current
> process. It isn't leftover from other processes.
>
> The avenues available for reading the memory:
> - /dev/mem and /dev/kmem (requires root, not available with Secure Boot)
> - /proc/pid/mem (requires ptrace privileges, mediated by YAMA)
> - ptrace (requires ptrace privileges, mediated by YAMA)
> - causing memory to be swapped to disk, and then inspecting the swap
>
> These all require a certain amount of privileges.
How to fix it?
~~~~~~~~~~~~~~
memzero(), which internally calls explicit_bzero(3), or whatever
alternative the system provides with a slightly different name, will
make sure that the buffer is zeroed in memory, and optimizations are not
allowed to impede this zeroing.
This is not really 100% effective, since compilers may place copies of
the string somewhere hidden in the stack. Those copies won't get zeroed
by explicit_bzero(3). However, that's arguably a compiler bug, since
compilers should make everything possible to avoid optimizing strings
that are later passed to explicit_bzero(3). But we all know that
sometimes it's impossible to have perfect knowledge in the compiler, so
this is plausible. Nevertheless, there's nothing we can do against such
issues, except minimizing the time such passwords are stored in plain
text.
Security concerns
~~~~~~~~~~~~~~~~~
We believe this isn't easy to exploit. Nevertheless, and since the fix
is trivial, this fix should probably be applied soon, and backported to
all supported distributions, to prevent someone else having more
imagination than us to find a way.
Affected versions
~~~~~~~~~~~~~~~~~
All. Bug introduced in shadow 19990709. That's the second commit in
the git history.
Fixes: 45c6603cc86c ("[svn-upgrade] Integrating new upstream version, shadow (19990709)")
Reported-by: Alejandro Colomar <alx@kernel.org>
Cc: Serge Hallyn <serge@hallyn.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Seth Arnold <seth.arnold@canonical.com>
Cc: Christian Brauner <christian@brauner.io>
Cc: Balint Reczey <rbalint@debian.org>
Cc: Sam James <sam@gentoo.org>
Cc: David Runge <dvzrv@archlinux.org>
Cc: Andreas Jaeger <aj@suse.de>
Cc: <~hallyn/shadow@lists.sr.ht>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com>
---
src/gpasswd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gpasswd.c b/src/gpasswd.c
index 4d75af96..a698b32a 100644
--- a/src/gpasswd.c
+++ b/src/gpasswd.c
@@ -918,6 +918,7 @@ static void change_passwd (struct group *gr)
strzero (cp);
cp = getpass (_("Re-enter new password: "));
if (NULL == cp) {
+ memzero (pass, sizeof pass);
exit (1);
}
--
2.42.0

View File

@@ -16,6 +16,7 @@ SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.
file://shadow-relaxed-usernames.patch \
file://CVE-2023-29383.patch \
file://0001-Overhaul-valid_field.patch \
file://CVE-2023-4641.patch \
"
SRC_URI_append_class-target = " \

View File

@@ -0,0 +1,64 @@
From a339f05cd269013fa133d2f148d73f6f7d4247e4 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org>
Date: Sat, 28 Aug 2021 16:02:12 +0300
Subject: Fix handling of extended header prefixes
* src/xheader.c (locate_handler): Recognize prefix keywords only
when followed by a dot.
(xattr_decoder): Use xmalloc/xstrdup instead of alloc
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/tar.git/commit/?id=a339f05cd269013fa133d2f148d73f6f7d4247e4]
CVE: CVE-2023-39804
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
src/xheader.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/xheader.c b/src/xheader.c
index 4f8b2b2..3cd694d 100644
--- a/src/xheader.c
+++ b/src/xheader.c
@@ -637,11 +637,11 @@ static struct xhdr_tab const *
locate_handler (char const *keyword)
{
struct xhdr_tab const *p;
-
for (p = xhdr_tab; p->keyword; p++)
if (p->prefix)
{
- if (strncmp (p->keyword, keyword, strlen(p->keyword)) == 0)
+ size_t kwlen = strlen (p->keyword);
+ if (keyword[kwlen] == '.' && strncmp (p->keyword, keyword, kwlen) == 0)
return p;
}
else
@@ -1716,19 +1716,20 @@ xattr_decoder (struct tar_stat_info *st,
char const *keyword, char const *arg, size_t size)
{
char *xstr, *xkey;
-
+
/* copy keyword */
- size_t klen_raw = strlen (keyword);
- xkey = alloca (klen_raw + 1);
- memcpy (xkey, keyword, klen_raw + 1) /* including null-terminating */;
+ xkey = xstrdup (keyword);
/* copy value */
- xstr = alloca (size + 1);
+ xstr = xmalloc (size + 1);
memcpy (xstr, arg, size + 1); /* separator included, for GNU tar '\n' */;
xattr_decode_keyword (xkey);
- xheader_xattr_add (st, xkey + strlen("SCHILY.xattr."), xstr, size);
+ xheader_xattr_add (st, xkey + strlen ("SCHILY.xattr."), xstr, size);
+
+ free (xkey);
+ free (xstr);
}
static void
--
cgit v1.1

View File

@@ -6,10 +6,13 @@ SECTION = "base"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PR = "r1"
SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2 \
file://musl_dirent.patch \
file://CVE-2021-20193.patch \
file://CVE-2022-48303.patch \
file://CVE-2023-39804.patch \
"
SRC_URI[md5sum] = "17917356fff5cb4bd3cd5a6c3e727b05"

View File

@@ -6,7 +6,7 @@ SECTION = "base"
LICENSE = "PD & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c679c9d6b02bc2757b3eaf8f53c43fba"
PV = "2023d"
PV = "2024a"
SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz;name=tzcode \
http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata \
@@ -14,5 +14,5 @@ SRC_URI =" http://www.iana.org/time-zones/repository/releases/tzcode${PV}.tar.gz
UPSTREAM_CHECK_URI = "http://www.iana.org/time-zones"
SRC_URI[tzcode.sha256sum] = "e9a5f9e118886d2de92b62bb05510a28cc6c058d791c93bd6b84d3292c3c161e"
SRC_URI[tzdata.sha256sum] = "dbca21970b0a8b8c0ceceec1d7b91fa903be0f6eca5ae732b5329672232a08f3"
SRC_URI[tzcode.sha256sum] = "80072894adff5a458f1d143e16e4ca1d8b2a122c9c5399da482cb68cba6a1ff8"
SRC_URI[tzdata.sha256sum] = "0d0434459acbd2059a7a8da1f3304a84a86591f6ed69c6248fffa502b6edffe3"

View File

@@ -0,0 +1,55 @@
From 9e2ecb2af8302dedc49cb6a63ebe063c58a9e7e3 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 14 Dec 2023 11:29:49 +1000
Subject: [PATCH] dix: allocate enough space for logical button maps
Both DeviceFocusEvent and the XIQueryPointer reply contain a bit for
each logical button currently down. Since buttons can be arbitrarily mapped
to anything up to 255 make sure we have enough bits for the maximum mapping.
CVE-2023-6816, ZDI-CAN-22664, ZDI-CAN-22665
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/9e2ecb2af8302dedc49cb6a63ebe063c58a9e7e3]
CVE: CVE-2023-6816
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
Xi/xiquerypointer.c | 3 +--
dix/enterleave.c | 5 +++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c
index 5b77b1a444..2b05ac5f39 100644
--- a/Xi/xiquerypointer.c
+++ b/Xi/xiquerypointer.c
@@ -149,8 +149,7 @@ ProcXIQueryPointer(ClientPtr client)
if (pDev->button) {
int i;
- rep.buttons_len =
- bytes_to_int32(bits_to_bytes(pDev->button->numButtons));
+ rep.buttons_len = bytes_to_int32(bits_to_bytes(256)); /* button map up to 255 */
rep.length += rep.buttons_len;
buttons = calloc(rep.buttons_len, 4);
if (!buttons)
diff --git a/dix/enterleave.c b/dix/enterleave.c
index 867ec74363..ded8679d76 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -784,8 +784,9 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER);
- /* XI 2 event */
- btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0;
+ /* XI 2 event contains the logical button map - maps are CARD8
+ * so we need 256 bits for the possibly maximum mapping */
+ btlen = (mouse->button) ? bits_to_bytes(256) : 0;
btlen = bytes_to_int32(btlen);
len = sizeof(xXIFocusInEvent) + btlen * 4;
--
GitLab

View File

@@ -0,0 +1,87 @@
From ece23be888a93b741aa1209d1dbf64636109d6a5 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 18 Dec 2023 14:27:50 +1000
Subject: [PATCH] dix: Allocate sufficient xEvents for our DeviceStateNotify
If a device has both a button class and a key class and numButtons is
zero, we can get an OOB write due to event under-allocation.
This function seems to assume a device has either keys or buttons, not
both. It has two virtually identical code paths, both of which assume
they're applying to the first event in the sequence.
A device with both a key and button class triggered a logic bug - only
one xEvent was allocated but the deviceStateNotify pointer was pushed on
once per type. So effectively this logic code:
int count = 1;
if (button && nbuttons > 32) count++;
if (key && nbuttons > 0) count++;
if (key && nkeys > 32) count++; // this is basically always true
// count is at 2 for our keys + zero button device
ev = alloc(count * sizeof(xEvent));
FixDeviceStateNotify(ev);
if (button)
FixDeviceStateNotify(ev++);
if (key)
FixDeviceStateNotify(ev++); // santa drops into the wrong chimney here
If the device has more than 3 valuators, the OOB is pushed back - we're
off by one so it will happen when the last deviceValuator event is
written instead.
Fix this by allocating the maximum number of events we may allocate.
Note that the current behavior is not protocol-correct anyway, this
patch fixes only the allocation issue.
Note that this issue does not trigger if the device has at least one
button. While the server does not prevent a button class with zero
buttons, it is very unlikely.
CVE-2024-0229, ZDI-CAN-22678
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/ece23be888a93b741aa1209d1dbf64636109d6a5]
CVE: CVE-2024-0229
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
dix/enterleave.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dix/enterleave.c b/dix/enterleave.c
index ded8679d76..17964b00a4 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -675,7 +675,8 @@ static void
DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
{
int evcount = 1;
- deviceStateNotify *ev, *sev;
+ deviceStateNotify sev[6 + (MAX_VALUATORS + 2)/3];
+ deviceStateNotify *ev;
deviceKeyStateNotify *kev;
deviceButtonStateNotify *bev;
@@ -714,7 +715,7 @@ DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
}
}
- sev = ev = xallocarray(evcount, sizeof(xEvent));
+ ev = sev;
FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first);
if (b != NULL) {
@@ -770,7 +771,6 @@ DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
DeliverEventsToWindow(dev, win, (xEvent *) sev, evcount,
DeviceStateNotifyMask, NullGrab);
- free(sev);
}
void
--
GitLab

View File

@@ -0,0 +1,221 @@
From 219c54b8a3337456ce5270ded6a67bcde53553d5 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 18 Dec 2023 12:26:20 +1000
Subject: [PATCH] dix: fix DeviceStateNotify event calculation
The previous code only made sense if one considers buttons and keys to
be mutually exclusive on a device. That is not necessarily true, causing
a number of issues.
This function allocates and fills in the number of xEvents we need to
send the device state down the wire. This is split across multiple
32-byte devices including one deviceStateNotify event and optional
deviceKeyStateNotify, deviceButtonStateNotify and (possibly multiple)
deviceValuator events.
The previous behavior would instead compose a sequence
of [state, buttonstate, state, keystate, valuator...]. This is not
protocol correct, and on top of that made the code extremely convoluted.
Fix this by streamlining: add both button and key into the deviceStateNotify
and then append the key state and button state, followed by the
valuators. Finally, the deviceValuator events contain up to 6 valuators
per event but we only ever sent through 3 at a time. Let's double that
troughput.
CVE-2024-0229, ZDI-CAN-22678
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/219c54b8a3337456ce5270ded6a67bcde53553d5]
CVE: CVE-2024-0229
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
dix/enterleave.c | 121 ++++++++++++++++++++---------------------------
1 file changed, 52 insertions(+), 69 deletions(-)
diff --git a/dix/enterleave.c b/dix/enterleave.c
index 17964b00a4..7b7ba1098b 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -615,9 +615,15 @@ FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v,
ev->type = DeviceValuator;
ev->deviceid = dev->id;
- ev->num_valuators = nval < 3 ? nval : 3;
+ ev->num_valuators = nval < 6 ? nval : 6;
ev->first_valuator = first;
switch (ev->num_valuators) {
+ case 6:
+ ev->valuator2 = v->axisVal[first + 5];
+ case 5:
+ ev->valuator2 = v->axisVal[first + 4];
+ case 4:
+ ev->valuator2 = v->axisVal[first + 3];
case 3:
ev->valuator2 = v->axisVal[first + 2];
case 2:
@@ -626,7 +632,6 @@ FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v,
ev->valuator0 = v->axisVal[first];
break;
}
- first += ev->num_valuators;
}
static void
@@ -646,7 +651,7 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
ev->num_buttons = b->numButtons;
memcpy((char *) ev->buttons, (char *) b->down, 4);
}
- else if (k) {
+ if (k) {
ev->classes_reported |= (1 << KeyClass);
ev->num_keys = k->xkbInfo->desc->max_key_code -
k->xkbInfo->desc->min_key_code;
@@ -670,15 +675,26 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
}
}
-
+/**
+ * The device state notify event is split across multiple 32-byte events.
+ * The first one contains the first 32 button state bits, the first 32
+ * key state bits, and the first 3 valuator values.
+ *
+ * If a device has more than that, the server sends out:
+ * - one deviceButtonStateNotify for buttons 32 and above
+ * - one deviceKeyStateNotify for keys 32 and above
+ * - one deviceValuator event per 6 valuators above valuator 4
+ *
+ * All events but the last one have the deviceid binary ORed with MORE_EVENTS,
+ */
static void
DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
{
+ /* deviceStateNotify, deviceKeyStateNotify, deviceButtonStateNotify
+ * and one deviceValuator for each 6 valuators */
+ deviceStateNotify sev[3 + (MAX_VALUATORS + 6)/6];
int evcount = 1;
- deviceStateNotify sev[6 + (MAX_VALUATORS + 2)/3];
- deviceStateNotify *ev;
- deviceKeyStateNotify *kev;
- deviceButtonStateNotify *bev;
+ deviceStateNotify *ev = sev;
KeyClassPtr k;
ButtonClassPtr b;
@@ -691,82 +707,49 @@ DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win)
if ((b = dev->button) != NULL) {
nbuttons = b->numButtons;
- if (nbuttons > 32)
+ if (nbuttons > 32) /* first 32 are encoded in deviceStateNotify */
evcount++;
}
if ((k = dev->key) != NULL) {
nkeys = k->xkbInfo->desc->max_key_code - k->xkbInfo->desc->min_key_code;
- if (nkeys > 32)
+ if (nkeys > 32) /* first 32 are encoded in deviceStateNotify */
evcount++;
- if (nbuttons > 0) {
- evcount++;
- }
}
if ((v = dev->valuator) != NULL) {
nval = v->numAxes;
-
- if (nval > 3)
- evcount++;
- if (nval > 6) {
- if (!(k && b))
- evcount++;
- if (nval > 9)
- evcount += ((nval - 7) / 3);
- }
+ /* first three are encoded in deviceStateNotify, then
+ * it's 6 per deviceValuator event */
+ evcount += ((nval - 3) + 6)/6;
}
- ev = sev;
- FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first);
-
- if (b != NULL) {
- FixDeviceStateNotify(dev, ev++, NULL, b, v, first);
- first += 3;
- nval -= 3;
- if (nbuttons > 32) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- bev = (deviceButtonStateNotify *) ev++;
- bev->type = DeviceButtonStateNotify;
- bev->deviceid = dev->id;
- memcpy((char *) &bev->buttons[4], (char *) &b->down[4],
- DOWN_LENGTH - 4);
- }
- if (nval > 0) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
- first += 3;
- nval -= 3;
- }
+ BUG_RETURN(evcount <= ARRAY_SIZE(sev));
+
+ FixDeviceStateNotify(dev, ev, k, b, v, first);
+
+ if (b != NULL && nbuttons > 32) {
+ deviceButtonStateNotify *bev = (deviceButtonStateNotify *) ++ev;
+ (ev - 1)->deviceid |= MORE_EVENTS;
+ bev->type = DeviceButtonStateNotify;
+ bev->deviceid = dev->id;
+ memcpy((char *) &bev->buttons[4], (char *) &b->down[4],
+ DOWN_LENGTH - 4);
}
- if (k != NULL) {
- FixDeviceStateNotify(dev, ev++, k, NULL, v, first);
- first += 3;
- nval -= 3;
- if (nkeys > 32) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- kev = (deviceKeyStateNotify *) ev++;
- kev->type = DeviceKeyStateNotify;
- kev->deviceid = dev->id;
- memmove((char *) &kev->keys[0], (char *) &k->down[4], 28);
- }
- if (nval > 0) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
- first += 3;
- nval -= 3;
- }
+ if (k != NULL && nkeys > 32) {
+ deviceKeyStateNotify *kev = (deviceKeyStateNotify *) ++ev;
+ (ev - 1)->deviceid |= MORE_EVENTS;
+ kev->type = DeviceKeyStateNotify;
+ kev->deviceid = dev->id;
+ memmove((char *) &kev->keys[0], (char *) &k->down[4], 28);
}
+ first = 3;
+ nval -= 3;
while (nval > 0) {
- FixDeviceStateNotify(dev, ev++, NULL, NULL, v, first);
- first += 3;
- nval -= 3;
- if (nval > 0) {
- (ev - 1)->deviceid |= MORE_EVENTS;
- FixDeviceValuator(dev, (deviceValuator *) ev++, v, first);
- first += 3;
- nval -= 3;
- }
+ ev->deviceid |= MORE_EVENTS;
+ FixDeviceValuator(dev, (deviceValuator *) ++ev, v, first);
+ first += 6;
+ nval -= 6;
}
DeliverEventsToWindow(dev, win, (xEvent *) sev, evcount,
--
GitLab

View File

@@ -0,0 +1,41 @@
From df3c65706eb169d5938df0052059f3e0d5981b74 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 21 Dec 2023 13:48:10 +1000
Subject: [PATCH] Xi: when creating a new ButtonClass, set the number of
buttons
There's a racy sequence where a master device may copy the button class
from the slave, without ever initializing numButtons. This leads to a
device with zero buttons but a button class which is invalid.
Let's copy the numButtons value from the source - by definition if we
don't have a button class yet we do not have any other slave devices
with more than this number of buttons anyway.
CVE-2024-0229, ZDI-CAN-22678
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/df3c65706eb169d5938df0052059f3e0d5981b74]
CVE: CVE-2024-0229
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
Xi/exevents.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 54ea11a938..e161714682 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -605,6 +605,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
to->button = calloc(1, sizeof(ButtonClassRec));
if (!to->button)
FatalError("[Xi] no memory for class shift.\n");
+ to->button->numButtons = from->button->numButtons;
}
else
classes->button = NULL;
--
GitLab

View File

@@ -0,0 +1,45 @@
From 37539cb0bfe4ed96d4499bf371e6b1a474a740fe Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 21 Dec 2023 14:10:11 +1000
Subject: [PATCH] Xi: require a pointer and keyboard device for
XIAttachToMaster
If we remove a master device and specify which other master devices
attached slaves should be returned to, enforce that those two are
indeeed a pointer and a keyboard.
Otherwise we can try to attach the keyboards to pointers and vice versa,
leading to possible crashes later.
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/37539cb0bfe4ed96d4499bf371e6b1a474a740fe]
CVE: CVE-2024-0229
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
Xi/xichangehierarchy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index 504defe566..d2d985848d 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -270,7 +270,7 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES])
if (rc != Success)
goto unwind;
- if (!IsMaster(newptr)) {
+ if (!IsMaster(newptr) || !IsPointerDevice(newptr)) {
client->errorValue = r->return_pointer;
rc = BadDevice;
goto unwind;
@@ -281,7 +281,7 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES])
if (rc != Success)
goto unwind;
- if (!IsMaster(newkeybd)) {
+ if (!IsMaster(newkeybd) || !IsKeyboardDevice(newkeybd)) {
client->errorValue = r->return_keyboard;
rc = BadDevice;
goto unwind;
--
GitLab

View File

@@ -0,0 +1,64 @@
From e5e8586a12a3ec915673edffa10dc8fe5e15dac3 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Wed, 6 Dec 2023 12:09:41 +0100
Subject: [PATCH] glx: Call XACE hooks on the GLX buffer
The XSELINUX code will label resources at creation by checking the
access mode. When the access mode is DixCreateAccess, it will call the
function to label the new resource SELinuxLabelResource().
However, GLX buffers do not go through the XACE hooks when created,
hence leaving the resource actually unlabeled.
When, later, the client tries to create another resource using that
drawable (like a GC for example), the XSELINUX code would try to use
the security ID of that object which has never been labeled, get a NULL
pointer and crash when checking whether the requested permissions are
granted for subject security ID.
To avoid the issue, make sure to call the XACE hooks when creating the
GLX buffers.
Credit goes to Donn Seeley <donn@xmission.com> for providing the patch.
CVE-2024-0408
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/e5e8586a12a3ec915673edffa10dc8fe5e15dac3]
CVE: CVE-2024-0408
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
glx/glxcmds.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index fc26a2e345..1e46d0c723 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -48,6 +48,7 @@
#include "indirect_util.h"
#include "protocol-versions.h"
#include "glxvndabi.h"
+#include "xace.h"
static char GLXServerVendorName[] = "SGI";
@@ -1392,6 +1393,13 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
if (!pPixmap)
return BadAlloc;
+ err = XaceHook(XACE_RESOURCE_ACCESS, client, glxDrawableId, RT_PIXMAP,
+ pPixmap, RT_NONE, NULL, DixCreateAccess);
+ if (err != Success) {
+ (*pGlxScreen->pScreen->DestroyPixmap) (pPixmap);
+ return err;
+ }
+
/* Assign the pixmap the same id as the pbuffer and add it as a
* resource so it and the DRI2 drawable will be reclaimed when the
* pbuffer is destroyed. */
--
GitLab

View File

@@ -0,0 +1,46 @@
From 2ef0f1116c65d5cb06d7b6d83f8a1aea702c94f7 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Wed, 6 Dec 2023 11:51:56 +0100
Subject: [PATCH] ephyr,xwayland: Use the proper private key for cursor
The cursor in DIX is actually split in two parts, the cursor itself and
the cursor bits, each with their own devPrivates.
The cursor itself includes the cursor bits, meaning that the cursor bits
devPrivates in within structure of the cursor.
Both Xephyr and Xwayland were using the private key for the cursor bits
to store the data for the cursor, and when using XSELINUX which comes
with its own special devPrivates, the data stored in that cursor bits'
devPrivates would interfere with the XSELINUX devPrivates data and the
SELINUX security ID would point to some other unrelated data, causing a
crash in the XSELINUX code when trying to (re)use the security ID.
CVE-2024-0409
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/2ef0f1116c65d5cb06d7b6d83f8a1aea702c94f7]
CVE: CVE-2024-0409
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
hw/kdrive/ephyr/ephyrcursor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/kdrive/ephyr/ephyrcursor.c b/hw/kdrive/ephyr/ephyrcursor.c
index f991899..3f192d0 100644
--- a/hw/kdrive/ephyr/ephyrcursor.c
+++ b/hw/kdrive/ephyr/ephyrcursor.c
@@ -246,7 +246,7 @@ miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
Bool
ephyrCursorInit(ScreenPtr screen)
{
- if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR_BITS,
+ if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR,
sizeof(ephyrCursorRec)))
return FALSE;
--
2.25.1

View File

@@ -0,0 +1,113 @@
From 4a5e9b1895627d40d26045bd0b7ef3dce503cbd1 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 4 Jan 2024 10:01:24 +1000
Subject: [PATCH] Xi: flush hierarchy events after adding/removing master
devices
The `XISendDeviceHierarchyEvent()` function allocates space to store up
to `MAXDEVICES` (256) `xXIHierarchyInfo` structures in `info`.
If a device with a given ID was removed and a new device with the same
ID added both in the same operation, the single device ID will lead to
two info structures being written to `info`.
Since this case can occur for every device ID at once, a total of two
times `MAXDEVICES` info structures might be written to the allocation.
To avoid it, once one add/remove master is processed, send out the
device hierarchy event for the current state and continue. That event
thus only ever has exactly one of either added/removed in it (and
optionally slave attached/detached).
CVE-2024-21885, ZDI-CAN-22744
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/4a5e9b1895627d40d26045bd0b7ef3dce503cbd1]
CVE: CVE-2024-21885
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
Xi/xichangehierarchy.c | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index d2d985848d..72d00451e3 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -416,6 +416,11 @@ ProcXIChangeHierarchy(ClientPtr client)
size_t len; /* length of data remaining in request */
int rc = Success;
int flags[MAXDEVICES] = { 0 };
+ enum {
+ NO_CHANGE,
+ FLUSH,
+ CHANGED,
+ } changes = NO_CHANGE;
REQUEST(xXIChangeHierarchyReq);
REQUEST_AT_LEAST_SIZE(xXIChangeHierarchyReq);
@@ -465,8 +470,9 @@ ProcXIChangeHierarchy(ClientPtr client)
rc = add_master(client, c, flags);
if (rc != Success)
goto unwind;
- }
+ changes = FLUSH;
break;
+ }
case XIRemoveMaster:
{
xXIRemoveMasterInfo *r = (xXIRemoveMasterInfo *) any;
@@ -475,8 +481,9 @@ ProcXIChangeHierarchy(ClientPtr client)
rc = remove_master(client, r, flags);
if (rc != Success)
goto unwind;
- }
+ changes = FLUSH;
break;
+ }
case XIDetachSlave:
{
xXIDetachSlaveInfo *c = (xXIDetachSlaveInfo *) any;
@@ -485,8 +492,9 @@ ProcXIChangeHierarchy(ClientPtr client)
rc = detach_slave(client, c, flags);
if (rc != Success)
goto unwind;
- }
+ changes = CHANGED;
break;
+ }
case XIAttachSlave:
{
xXIAttachSlaveInfo *c = (xXIAttachSlaveInfo *) any;
@@ -495,16 +503,25 @@ ProcXIChangeHierarchy(ClientPtr client)
rc = attach_slave(client, c, flags);
if (rc != Success)
goto unwind;
+ changes = CHANGED;
+ break;
}
+ default:
break;
}
+ if (changes == FLUSH) {
+ XISendDeviceHierarchyEvent(flags);
+ memset(flags, 0, sizeof(flags));
+ changes = NO_CHANGE;
+ }
+
len -= any->length * 4;
any = (xXIAnyHierarchyChangeInfo *) ((char *) any + any->length * 4);
}
unwind:
-
- XISendDeviceHierarchyEvent(flags);
+ if (changes != NO_CHANGE)
+ XISendDeviceHierarchyEvent(flags);
return rc;
}
--
GitLab

View File

@@ -0,0 +1,74 @@
From bc1fdbe46559dd947674375946bbef54dd0ce36b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
Date: Fri, 22 Dec 2023 18:28:31 +0100
Subject: [PATCH] Xi: do not keep linked list pointer during recursion
The `DisableDevice()` function is called whenever an enabled device
is disabled and it moves the device from the `inputInfo.devices` linked
list to the `inputInfo.off_devices` linked list.
However, its link/unlink operation has an issue during the recursive
call to `DisableDevice()` due to the `prev` pointer pointing to a
removed device.
This issue leads to a length mismatch between the total number of
devices and the number of device in the list, leading to a heap
overflow and, possibly, to local privilege escalation.
Simplify the code that checked whether the device passed to
`DisableDevice()` was in `inputInfo.devices` or not and find the
previous device after the recursion.
CVE-2024-21886, ZDI-CAN-22840
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/bc1fdbe46559dd947674375946bbef54dd0ce36b]
CVE: CVE-2024-21886
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
dix/devices.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/dix/devices.c b/dix/devices.c
index dca98c8d1b..389d28a23c 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -453,14 +453,20 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
{
DeviceIntPtr *prev, other;
BOOL enabled;
+ BOOL dev_in_devices_list = FALSE;
int flags[MAXDEVICES] = { 0 };
if (!dev->enabled)
return TRUE;
- for (prev = &inputInfo.devices;
- *prev && (*prev != dev); prev = &(*prev)->next);
- if (*prev != dev)
+ for (other = inputInfo.devices; other; other = other->next) {
+ if (other == dev) {
+ dev_in_devices_list = TRUE;
+ break;
+ }
+ }
+
+ if (!dev_in_devices_list)
return FALSE;
TouchEndPhysicallyActiveTouches(dev);
@@ -511,6 +517,9 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
LeaveWindow(dev);
SetFocusOut(dev);
+ for (prev = &inputInfo.devices;
+ *prev && (*prev != dev); prev = &(*prev)->next);
+
*prev = dev->next;
dev->next = inputInfo.off_devices;
inputInfo.off_devices = dev;
--
GitLab

View File

@@ -0,0 +1,57 @@
From 26769aa71fcbe0a8403b7fb13b7c9010cc07c3a8 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 5 Jan 2024 09:40:27 +1000
Subject: [PATCH] dix: when disabling a master, float disabled slaved devices
too
Disabling a master device floats all slave devices but we didn't do this
to already-disabled slave devices. As a result those devices kept their
reference to the master device resulting in access to already freed
memory if the master device was removed before the corresponding slave
device.
And to match this behavior, also forcibly reset that pointer during
CloseDownDevices().
Related to CVE-2024-21886, ZDI-CAN-22840
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/26769aa71fcbe0a8403b7fb13b7c9010cc07c3a8]
CVE: CVE-2024-21886
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
dix/devices.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dix/devices.c b/dix/devices.c
index 389d28a23c..84a6406d13 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -483,6 +483,13 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
flags[other->id] |= XISlaveDetached;
}
}
+
+ for (other = inputInfo.off_devices; other; other = other->next) {
+ if (!IsMaster(other) && GetMaster(other, MASTER_ATTACHED) == dev) {
+ AttachDevice(NULL, other, NULL);
+ flags[other->id] |= XISlaveDetached;
+ }
+ }
}
else {
for (other = inputInfo.devices; other; other = other->next) {
@@ -1088,6 +1095,11 @@ CloseDownDevices(void)
dev->master = NULL;
}
+ for (dev = inputInfo.off_devices; dev; dev = dev->next) {
+ if (!IsMaster(dev) && !IsFloating(dev))
+ dev->master = NULL;
+ }
+
CloseDeviceList(&inputInfo.devices);
CloseDeviceList(&inputInfo.off_devices);
--
GitLab

View File

@@ -0,0 +1,49 @@
From 96798fc1967491c80a4d0c8d9e0a80586cb2152b Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri, 22 Mar 2024 18:51:45 -0700
Subject: [PATCH] Xi: ProcXIGetSelectedEvents needs to use unswapped length to
send reply
CVE-2024-31080
Reported-by: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69762
Fixes: 53e821ab4 ("Xi: add request processing for XIGetSelectedEvents.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463>
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/96798fc1967491c80a4d0c8d9e0a80586cb2152b]
CVE: CVE-2024-31080
Signed-off-by: Ashish Sharma <asharma@mvista.com>
Xi/xiselectev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c
index edcb8a0d36..ac14949871 100644
--- a/Xi/xiselectev.c
+++ b/Xi/xiselectev.c
@@ -349,6 +349,7 @@ ProcXIGetSelectedEvents(ClientPtr client)
InputClientsPtr others = NULL;
xXIEventMask *evmask = NULL;
DeviceIntPtr dev;
+ uint32_t length;
REQUEST(xXIGetSelectedEventsReq);
REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
@@ -418,10 +419,12 @@ ProcXIGetSelectedEvents(ClientPtr client)
}
}
+ /* save the value before SRepXIGetSelectedEvents swaps it */
+ length = reply.length;
WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply);
if (reply.num_masks)
- WriteToClient(client, reply.length * 4, buffer);
+ WriteToClient(client, length * 4, buffer);
free(buffer);
return Success;
--
GitLab

View File

@@ -0,0 +1,47 @@
From 3e77295f888c67fc7645db5d0c00926a29ffecee Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri, 22 Mar 2024 18:56:27 -0700
Subject: [PATCH] Xi: ProcXIPassiveGrabDevice needs to use unswapped length to
send reply
CVE-2024-31081
Fixes: d220d6907 ("Xi: add GrabButton and GrabKeysym code.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463>
Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/3e77295f888c67fc7645db5d0c00926a29ffecee]
CVE: CVE-2024-31081
Signed-off-by: Ashish Sharma <asharma@mvista.com>
Xi/xipassivegrab.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index c9ac2f8553..896233bec2 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -93,6 +93,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
GrabParameters param;
void *tmp;
int mask_len;
+ uint32_t length;
REQUEST(xXIPassiveGrabDeviceReq);
REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq,
@@ -247,9 +248,11 @@ ProcXIPassiveGrabDevice(ClientPtr client)
}
}
+ /* save the value before SRepXIPassiveGrabDevice swaps it */
+ length = rep.length;
WriteReplyToClient(client, sizeof(rep), &rep);
if (rep.num_modifiers)
- WriteToClient(client, rep.length * 4, modifiers_failed);
+ WriteToClient(client, length * 4, modifiers_failed);
out:
free(modifiers_failed);
--
GitLab

View File

@@ -20,6 +20,18 @@ SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.pat
file://CVE-2023-5380.patch \
file://CVE-2023-6377.patch \
file://CVE-2023-6478.patch \
file://CVE-2023-6816.patch \
file://CVE-2024-0229-1.patch \
file://CVE-2024-0229-2.patch \
file://CVE-2024-0229-3.patch \
file://CVE-2024-0229-4.patch \
file://CVE-2024-21885.patch \
file://CVE-2024-21886-1.patch \
file://CVE-2024-21886-2.patch \
file://CVE-2024-0408.patch \
file://CVE-2024-0409.patch \
file://CVE-2024-31081.patch \
file://CVE-2024-31080.patch \
"
SRC_URI[md5sum] = "453fc86aac8c629b3a5b77e8dcca30bf"
SRC_URI[sha256sum] = "54b199c9280ff8bf0f73a54a759645bd0eeeda7255d1c99310d5b7595f3ac066"

View File

@@ -134,7 +134,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
"
# WHENCE checksum is defined separately to ease overriding it if
# class-devupstream is selected.
WHENCE_CHKSUM = "ceb5248746d24d165b603e71b288cf75"
WHENCE_CHKSUM = "a344e6c28970fc7daafa81c10247aeb6"
# These are not common licenses, set NO_GENERIC_LICENSE for them
# so that the license files will be copied from fetched source
@@ -212,7 +212,7 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw
# Pin this to the 20220509 release, override this in local.conf
SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae"
SRC_URI[sha256sum] = "c98d200fc4a3120de1a594713ce34e135819dff23e883a4ed387863ba25679c7"
SRC_URI[sha256sum] = "bf0f239dc0801e9d6bf5d5fb3e2f549575632cf4688f4348184199cb02c2bcd7"
inherit allarch
@@ -223,7 +223,8 @@ do_compile() {
}
do_install() {
oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' install
# install-nodedup avoids rdfind dependency
oe_runmake 'DESTDIR=${D}' 'FIRMWAREDIR=${nonarch_base_libdir}/firmware' install-nodedup
cp GPL-2 LICEN[CS]E.* WHENCE ${D}${nonarch_base_libdir}/firmware/
}

File diff suppressed because it is too large Load Diff

View File

@@ -11,13 +11,13 @@ python () {
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
}
SRCREV_machine ?= "43d5f7eb85acc21ec87ec45b2cae127dad8bf7a4"
SRCREV_meta ?= "34f54c16ac6ef29441f95dd3b932729f01008999"
SRCREV_machine ?= "c93e75bc334ba00df2d66411a0d79c4378cf4af8"
SRCREV_meta ?= "ecd382f3477fae022ad1881e4c39e810cdc3c760"
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
LINUX_VERSION ?= "5.4.262"
LINUX_VERSION ?= "5.4.273"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

View File

@@ -6,7 +6,7 @@ KCONFIG_MODE = "--allnoconfig"
require recipes-kernel/linux/linux-yocto.inc
LINUX_VERSION ?= "5.4.262"
LINUX_VERSION ?= "5.4.273"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native"
KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
SRCREV_machine_qemuarm ?= "7c33fa232f43e9059395bd30e23ef3c16359ba11"
SRCREV_machine ?= "42abef1facd8bc8d1f51470493f08d87d0862f8e"
SRCREV_meta ?= "34f54c16ac6ef29441f95dd3b932729f01008999"
SRCREV_machine_qemuarm ?= "d29f3f3a932319053ad24d84b087b0a57908c1bc"
SRCREV_machine ?= "b6480d09d84d09e7560daa5c1d73917292ae30c0"
SRCREV_meta ?= "ecd382f3477fae022ad1881e4c39e810cdc3c760"
PV = "${LINUX_VERSION}+git${SRCPV}"

View File

@@ -13,16 +13,16 @@ KBRANCH_qemux86 ?= "v5.4/standard/base"
KBRANCH_qemux86-64 ?= "v5.4/standard/base"
KBRANCH_qemumips64 ?= "v5.4/standard/mti-malta64"
SRCREV_machine_qemuarm ?= "76b8ef2c7ecb7cf484e0eff4d509ec57c310d06e"
SRCREV_machine_qemuarm64 ?= "23b9912a979d98708f3adc8312af42eb9049c1d6"
SRCREV_machine_qemumips ?= "2e266704c46066c80821a491ad6f42c930e00d5d"
SRCREV_machine_qemuppc ?= "2343a888a77678d4440032d22327f753d1a90cdb"
SRCREV_machine_qemuriscv64 ?= "dbf9e2bf8e764643b8ec4c236fbab73228413a33"
SRCREV_machine_qemux86 ?= "dbf9e2bf8e764643b8ec4c236fbab73228413a33"
SRCREV_machine_qemux86-64 ?= "dbf9e2bf8e764643b8ec4c236fbab73228413a33"
SRCREV_machine_qemumips64 ?= "73d9e7eaf1161e5deb6d3fbfdefb07fc5fd87d3f"
SRCREV_machine ?= "dbf9e2bf8e764643b8ec4c236fbab73228413a33"
SRCREV_meta ?= "34f54c16ac6ef29441f95dd3b932729f01008999"
SRCREV_machine_qemuarm ?= "b7e0891bf4b281c4e29b86f708e10a3339670acc"
SRCREV_machine_qemuarm64 ?= "ff75f0c7beb167391f0285dd2993394cd143a8a7"
SRCREV_machine_qemumips ?= "650e43a19e625d1db9d8245cda27db7b86990398"
SRCREV_machine_qemuppc ?= "0fb6546a09f90befecb11cd0f10274276e8a3021"
SRCREV_machine_qemuriscv64 ?= "fe901e2f4b156e9cf7ddb03f479f7339d28e398b"
SRCREV_machine_qemux86 ?= "fe901e2f4b156e9cf7ddb03f479f7339d28e398b"
SRCREV_machine_qemux86-64 ?= "fe901e2f4b156e9cf7ddb03f479f7339d28e398b"
SRCREV_machine_qemumips64 ?= "f59947f338319b1741db5dfac34f08399561ab25"
SRCREV_machine ?= "fe901e2f4b156e9cf7ddb03f479f7339d28e398b"
SRCREV_meta ?= "ecd382f3477fae022ad1881e4c39e810cdc3c760"
# remap qemuarm to qemuarma15 for the 5.4 kernel
# KMACHINE_qemuarm ?= "qemuarma15"
@@ -31,7 +31,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA}"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
LINUX_VERSION ?= "5.4.262"
LINUX_VERSION ?= "5.4.273"
DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
DEPENDS += "openssl-native util-linux-native"

View File

@@ -9,7 +9,7 @@ HOMEPAGE = "https://perf.wiki.kernel.org/index.php/Main_Page"
LICENSE = "GPLv2"
PR = "r9"
PR = "r10"
PACKAGECONFIG ??= "scripting tui libunwind"
PACKAGECONFIG[dwarf] = ",NO_DWARF=1"

View File

@@ -0,0 +1,49 @@
From f199d1982ef8a6c6d5c06c082d057b8793bcc6aa Mon Sep 17 00:00:00 2001
From: Serhei Makarov <serhei@serhei.io>
Date: Fri, 21 Jan 2022 18:21:46 -0500
Subject: [PATCH] gcc12 c++ compatibility re-tweak for rhel6: use function
pointer instead of lambdas instead of ptr_fun<>
Saving 2 lines in ltrim/rtrim is probably not a good reason to drop
compatibility with the RHEL6 system compiler. Actually declaring a
named function and passing the function pointer is compatible with
everything.
Upstream-Status: Backport [https://sourceware.org/git/?p=systemtap.git;a=commit;h=f199d1982ef8a6c6d5c06c082d057b8793bcc6aa]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
util.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
--- a/util.cxx
+++ b/util.cxx
@@ -1757,21 +1757,24 @@ flush_to_stream (const string &fname, os
return 1; // Failure
}
+int
+not_isspace(unsigned char c)
+{
+ return !std::isspace(c);
+}
+
// trim from start (in place)
void
ltrim(std::string &s)
{
- s.erase(s.begin(),
- std::find_if(s.begin(), s.end(),
- std::not1(std::ptr_fun<int, int>(std::isspace))));
+ s.erase(s.begin(), std::find_if(s.begin(), s.end(), not_isspace));
}
// trim from end (in place)
void
rtrim(std::string &s)
{
- s.erase(std::find_if(s.rbegin(), s.rend(),
- std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
+ s.erase(std::find_if(s.rbegin(), s.rend(), not_isspace).base(), s.end());
}
// trim from both ends (in place)

View File

@@ -6,7 +6,9 @@ HOMEPAGE = "https://sourceware.org/systemtap/"
require systemtap_git.inc
SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch"
SRC_URI += "file://0001-improve-reproducibility-for-c-compiling.patch \
file://0001-gcc12-c-compatibility-re-tweak-for-rhel6-use-functio.patch \
"
DEPENDS = "elfutils"

View File

@@ -5,7 +5,7 @@ LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
SRC_URI[sha256sum] = "f254d08ab3765aeae2b856222e11a95d44aef519a6663877c71ef68fae4c8c12"
SRC_URI[sha256sum] = "c8a61c9acf76fa7eb4239e89f640dee3e87098d9f69b4d3518c9c60fc6d20c55"
inherit bin_package allarch
@@ -13,7 +13,7 @@ do_install() {
install -d -m0755 ${D}${nonarch_libdir}/crda
install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys
install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin
install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem
install -m 0644 wens.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/wens.key.pub.pem
install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db
install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s

View File

@@ -0,0 +1,53 @@
[Ubuntu note: Backport of the following patch from upstream, with a few changes
to match the current version of the file in the present Ubuntu release:
. using TIFFErrorExt instead of TIFFErrorExtR (the latter did not exist yet);
-- Rodrigo Figueiredo Zaiden]
Backport of:
From 51558511bdbbcffdce534db21dbaf5d54b31638a Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 31 Oct 2023 15:58:41 +0100
Subject: [PATCH] TIFFReadRGBAStrip/TIFFReadRGBATile: add more validation of
col/row (fixes #622)
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/tiff/tree/debian/patches/CVE-2023-52356.patch?h=ubuntu/focal-security
Upstream commit https://gitlab.com/libtiff/libtiff/-/commit/51558511bdbbcffdce534db21dbaf5d54b31638a]
CVE: CVE-2023-52356
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
libtiff/tif_getimage.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- tiff-4.1.0+git191117.orig/libtiff/tif_getimage.c
+++ tiff-4.1.0+git191117/libtiff/tif_getimage.c
@@ -2926,6 +2926,13 @@ TIFFReadRGBAStripExt(TIFF* tif, uint32 r
}
if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop_on_error, emsg)) {
+ if (row >= img.height)
+ {
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif),
+ "Invalid row passed to TIFFReadRGBAStrip().");
+ TIFFRGBAImageEnd(&img);
+ return (0);
+ }
img.row_offset = row;
img.col_offset = 0;
@@ -3002,6 +3009,14 @@ TIFFReadRGBATileExt(TIFF* tif, uint32 co
return( 0 );
}
+ if (col >= img.width || row >= img.height)
+ {
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif),
+ "Invalid row/col passed to TIFFReadRGBATile().");
+ TIFFRGBAImageEnd(&img);
+ return (0);
+ }
+
/*
* The TIFFRGBAImageGet() function doesn't allow us to get off the
* edge of the image, even to fill an otherwise valid tile. So we

View File

@@ -0,0 +1,191 @@
[Ubuntu note: Backport of the following patch from upstream, with a few changes
to match the current version of the file in the present Ubuntu release:
. included inttypes.h header to support PRIu32 and PRIu64;
. using TIFFWarningExt instead of TIFFWarningExtR (the latter did not exist yet);
. using uint64 instead of uint64_t to preserve the current code usage;
. calling _TIFFfree(data) instead of _TIFFfreeExt(tif, data) (the latter did not exist yet);
. calls to the check size, that is the idea of the patch, were added before
_TIFFCheckMalloc and may note match the original patch methods;
-- Rodrigo Figueiredo Zaiden]
Backport of:
From 5320c9d89c054fa805d037d84c57da874470b01a Mon Sep 17 00:00:00 2001
From: Su Laus <sulau@freenet.de>
Date: Tue, 31 Oct 2023 15:43:29 +0000
Subject: [PATCH] Prevent some out-of-memory attacks
Some small fuzzer files fake large amounts of data and provoke out-of-memory situations. For non-compressed data content / tags, out-of-memory can be prevented by comparing with the file size.
At image reading, data size of some tags / data structures (StripByteCounts, StripOffsets, StripArray, TIFF directory) is compared with file size to prevent provoked out-of-memory attacks.
See issue https://gitlab.com/libtiff/libtiff/-/issues/614#note_1602683857
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/tiff/tree/debian/patches/CVE-2023-6277-1.patch?h=ubuntu/focal-security
Upstream commit https://gitlab.com/libtiff/libtiff/-/commit/5320c9d89c054fa805d037d84c57da874470b01a]
CVE: CVE-2023-6277
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
libtiff/tif_dirread.c | 92 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 90 insertions(+), 2 deletions(-)
--- tiff-4.1.0+git191117.orig/libtiff/tif_dirread.c
+++ tiff-4.1.0+git191117/libtiff/tif_dirread.c
@@ -37,6 +37,7 @@
#include "tiffiop.h"
#include <float.h>
#include <stdlib.h>
+#include <inttypes.h>
#define FAILED_FII ((uint32) -1)
@@ -863,6 +864,21 @@ static enum TIFFReadDirEntryErr TIFFRead
datasize=(*count)*typesize;
assert((tmsize_t)datasize>0);
+ /* Before allocating a huge amount of memory for corrupted files, check if
+ * size of requested memory is not greater than file size.
+ */
+ uint64 filesize = TIFFGetFileSize(tif);
+ if (datasize > filesize)
+ {
+ TIFFWarningExt(tif->tif_clientdata, "ReadDirEntryArray",
+ "Requested memory size for tag %d (0x%x) %" PRIu32
+ " is greather than filesize %" PRIu64
+ ". Memory not allocated, tag not read",
+ direntry->tdir_tag, direntry->tdir_tag, datasize,
+ filesize);
+ return (TIFFReadDirEntryErrAlloc);
+ }
+
if( isMapped(tif) && datasize > (uint32)tif->tif_size )
return TIFFReadDirEntryErrIo;
@@ -4534,6 +4550,20 @@ EstimateStripByteCounts(TIFF* tif, TIFFD
if( !_TIFFFillStrilesInternal( tif, 0 ) )
return -1;
+ /* Before allocating a huge amount of memory for corrupted files, check if
+ * size of requested memory is not greater than file size. */
+ uint64 filesize = TIFFGetFileSize(tif);
+ uint64 allocsize = (uint64)td->td_nstrips * sizeof(uint64);
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(tif->tif_clientdata, module,
+ "Requested memory size for StripByteCounts of %" PRIu64
+ " is greather than filesize %" PRIu64
+ ". Memory not allocated",
+ allocsize, filesize);
+ return -1;
+ }
+
if (td->td_stripbytecount_p)
_TIFFfree(td->td_stripbytecount_p);
td->td_stripbytecount_p = (uint64*)
@@ -4544,9 +4574,7 @@ EstimateStripByteCounts(TIFF* tif, TIFFD
if (td->td_compression != COMPRESSION_NONE) {
uint64 space;
- uint64 filesize;
uint16 n;
- filesize = TIFFGetFileSize(tif);
if (!(tif->tif_flags&TIFF_BIGTIFF))
space=sizeof(TIFFHeaderClassic)+2+dircount*12+4;
else
@@ -4854,6 +4882,20 @@ TIFFFetchDirectory(TIFF* tif, uint64 dir
dircount16 = (uint16)dircount64;
dirsize = 20;
}
+ /* Before allocating a huge amount of memory for corrupted files, check
+ * if size of requested memory is not greater than file size. */
+ uint64 filesize = TIFFGetFileSize(tif);
+ uint64 allocsize = (uint64)dircount16 * dirsize;
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(
+ tif->tif_clientdata, module,
+ "Requested memory size for TIFF directory of %" PRIu64
+ " is greather than filesize %" PRIu64
+ ". Memory not allocated, TIFF directory not read",
+ allocsize, filesize);
+ return 0;
+ }
origdir = _TIFFCheckMalloc(tif, dircount16,
dirsize, "to read TIFF directory");
if (origdir == NULL)
@@ -4957,6 +4999,20 @@ TIFFFetchDirectory(TIFF* tif, uint64 dir
"Sanity check on directory count failed, zero tag directories not supported");
return 0;
}
+ /* Before allocating a huge amount of memory for corrupted files, check
+ * if size of requested memory is not greater than file size. */
+ uint64 filesize = TIFFGetFileSize(tif);
+ uint64 allocsize = (uint64)dircount16 * dirsize;
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(
+ tif->tif_clientdata, module,
+ "Requested memory size for TIFF directory of %" PRIu64
+ " is greather than filesize %" PRIu64
+ ". Memory not allocated, TIFF directory not read",
+ allocsize, filesize);
+ return 0;
+ }
origdir = _TIFFCheckMalloc(tif, dircount16,
dirsize,
"to read TIFF directory");
@@ -5000,6 +5056,8 @@ TIFFFetchDirectory(TIFF* tif, uint64 dir
}
}
}
+ /* No check against filesize needed here because "dir" should have same size
+ * than "origdir" checked above. */
dir = (TIFFDirEntry*)_TIFFCheckMalloc(tif, dircount16,
sizeof(TIFFDirEntry),
"to read TIFF directory");
@@ -5769,7 +5827,20 @@ TIFFFetchStripThing(TIFF* tif, TIFFDirEn
_TIFFfree(data);
return(0);
}
-
+ /* Before allocating a huge amount of memory for corrupted files, check
+ * if size of requested memory is not greater than file size. */
+ uint64 filesize = TIFFGetFileSize(tif);
+ uint64 allocsize = (uint64)nstrips * sizeof(uint64);
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(tif->tif_clientdata, module,
+ "Requested memory size for StripArray of %" PRIu64
+ " is greather than filesize %" PRIu64
+ ". Memory not allocated",
+ allocsize, filesize);
+ _TIFFfree(data);
+ return (0);
+ }
resizeddata=(uint64*)_TIFFCheckMalloc(tif,nstrips,sizeof(uint64),"for strip array");
if (resizeddata==0) {
_TIFFfree(data);
@@ -5865,6 +5936,23 @@ static void allocChoppedUpStripArrays(TI
}
bytecount = last_offset + last_bytecount - offset;
+ /* Before allocating a huge amount of memory for corrupted files, check if
+ * size of StripByteCount and StripOffset tags is not greater than
+ * file size.
+ */
+ uint64 allocsize = (uint64)nstrips * sizeof(uint64) * 2;
+ uint64 filesize = TIFFGetFileSize(tif);
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(tif->tif_clientdata, "allocChoppedUpStripArrays",
+ "Requested memory size for StripByteCount and "
+ "StripOffsets %" PRIu64
+ " is greather than filesize %" PRIu64
+ ". Memory not allocated",
+ allocsize, filesize);
+ return;
+ }
+
newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64),
"for chopped \"StripByteCounts\" array");
newoffsets = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64),

View File

@@ -0,0 +1,152 @@
[Ubuntu note: Backport of the following patch from upstream, with a few changes
to match the current version of the file in the present Ubuntu release:
. using TIFFWarningExt instead of TIFFWarningExtR (the latter did not exist yet);
. using uint64 instead of uint64_t to preserve the current code usage;
-- Rodrigo Figueiredo Zaiden]
Backport of:
From 0b025324711213a75e38b52f7e7ba60235f108aa Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 31 Oct 2023 19:47:22 +0100
Subject: [PATCH] tif_dirread.c: only issue TIFFGetFileSize() for large enough
RAM requests
Ammends 5320c9d89c054fa805d037d84c57da874470b01a
This fixes a performance regression caught by the GDAL regression test
suite.
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/tiff/tree/debian/patches/CVE-2023-6277-2.patch?h=ubuntu/focal-security
Upstream commit https://gitlab.com/libtiff/libtiff/-/commit/0b025324711213a75e38b52f7e7ba60235f108aa]
CVE: CVE-2023-6277
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
libtiff/tif_dirread.c | 83 +++++++++++++++++++++++++------------------
1 file changed, 48 insertions(+), 35 deletions(-)
--- tiff-4.1.0+git191117.orig/libtiff/tif_dirread.c
+++ tiff-4.1.0+git191117/libtiff/tif_dirread.c
@@ -864,19 +864,22 @@ static enum TIFFReadDirEntryErr TIFFRead
datasize=(*count)*typesize;
assert((tmsize_t)datasize>0);
- /* Before allocating a huge amount of memory for corrupted files, check if
- * size of requested memory is not greater than file size.
- */
- uint64 filesize = TIFFGetFileSize(tif);
- if (datasize > filesize)
+ if (datasize > 100 * 1024 * 1024)
{
- TIFFWarningExt(tif->tif_clientdata, "ReadDirEntryArray",
- "Requested memory size for tag %d (0x%x) %" PRIu32
- " is greather than filesize %" PRIu64
- ". Memory not allocated, tag not read",
- direntry->tdir_tag, direntry->tdir_tag, datasize,
- filesize);
- return (TIFFReadDirEntryErrAlloc);
+ /* Before allocating a huge amount of memory for corrupted files, check
+ * if size of requested memory is not greater than file size.
+ */
+ const uint64 filesize = TIFFGetFileSize(tif);
+ if (datasize > filesize)
+ {
+ TIFFWarningExt(tif->tif_clientdata, "ReadDirEntryArray",
+ "Requested memory size for tag %d (0x%x) %" PRIu32
+ " is greater than filesize %" PRIu64
+ ". Memory not allocated, tag not read",
+ direntry->tdir_tag, direntry->tdir_tag, datasize,
+ filesize);
+ return (TIFFReadDirEntryErrAlloc);
+ }
}
if( isMapped(tif) && datasize > (uint32)tif->tif_size )
@@ -4550,18 +4553,22 @@ EstimateStripByteCounts(TIFF* tif, TIFFD
if( !_TIFFFillStrilesInternal( tif, 0 ) )
return -1;
- /* Before allocating a huge amount of memory for corrupted files, check if
- * size of requested memory is not greater than file size. */
- uint64 filesize = TIFFGetFileSize(tif);
- uint64 allocsize = (uint64)td->td_nstrips * sizeof(uint64);
- if (allocsize > filesize)
+ const uint64 allocsize = (uint64)td->td_nstrips * sizeof(uint64);
+ uint64 filesize = 0;
+ if (allocsize > 100 * 1024 * 1024)
{
- TIFFWarningExt(tif->tif_clientdata, module,
- "Requested memory size for StripByteCounts of %" PRIu64
- " is greather than filesize %" PRIu64
- ". Memory not allocated",
- allocsize, filesize);
- return -1;
+ /* Before allocating a huge amount of memory for corrupted files, check
+ * if size of requested memory is not greater than file size. */
+ filesize = TIFFGetFileSize(tif);
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(
+ tif->tif_clientdata, module,
+ "Requested memory size for StripByteCounts of %" PRIu64
+ " is greater than filesize %" PRIu64 ". Memory not allocated",
+ allocsize, filesize);
+ return -1;
+ }
}
if (td->td_stripbytecount_p)
@@ -4608,11 +4615,13 @@ EstimateStripByteCounts(TIFF* tif, TIFFD
return -1;
space+=datasize;
}
+ if (filesize == 0)
+ filesize = TIFFGetFileSize(tif);
if( filesize < space )
- /* we should perhaps return in error ? */
- space = filesize;
- else
- space = filesize - space;
+ /* we should perhaps return in error ? */
+ space = filesize;
+ else
+ space = filesize - space;
if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
space /= td->td_samplesperpixel;
for (strip = 0; strip < td->td_nstrips; strip++)
@@ -4882,19 +4891,23 @@ TIFFFetchDirectory(TIFF* tif, uint64 dir
dircount16 = (uint16)dircount64;
dirsize = 20;
}
- /* Before allocating a huge amount of memory for corrupted files, check
- * if size of requested memory is not greater than file size. */
- uint64 filesize = TIFFGetFileSize(tif);
- uint64 allocsize = (uint64)dircount16 * dirsize;
- if (allocsize > filesize)
+ const uint64 allocsize = (uint64)dircount16 * dirsize;
+ if (allocsize > 100 * 1024 * 1024)
{
- TIFFWarningExt(
- tif->tif_clientdata, module,
- "Requested memory size for TIFF directory of %" PRIu64
- " is greather than filesize %" PRIu64
- ". Memory not allocated, TIFF directory not read",
- allocsize, filesize);
- return 0;
+ /* Before allocating a huge amount of memory for corrupted files,
+ * check if size of requested memory is not greater than file size.
+ */
+ const uint64 filesize = TIFFGetFileSize(tif);
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(
+ tif->tif_clientdata, module,
+ "Requested memory size for TIFF directory of %" PRIu64
+ " is greater than filesize %" PRIu64
+ ". Memory not allocated, TIFF directory not read",
+ allocsize, filesize);
+ return 0;
+ }
}
origdir = _TIFFCheckMalloc(tif, dircount16,
dirsize, "to read TIFF directory");

View File

@@ -0,0 +1,46 @@
Backport of:
From de7bfd7d4377c266f81849579f696fa1ad5ba6c3 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 31 Oct 2023 20:13:45 +0100
Subject: [PATCH] TIFFFetchDirectory(): remove useless allocsize vs filesize
check
CoverityScan rightly points that the max value for dircount16 * dirsize
is 4096 * 20. That's small enough not to do any check
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/tiff/tree/debian/patches/CVE-2023-6277-3.patch?h=ubuntu/focal-security
Upstream commit https://gitlab.com/libtiff/libtiff/-/commit/de7bfd7d4377c266f81849579f696fa1ad5ba6c3]
CVE: CVE-2023-6277
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
libtiff/tif_dirread.c | 18 ------------------
1 file changed, 18 deletions(-)
--- tiff-4.1.0+git191117.orig/libtiff/tif_dirread.c
+++ tiff-4.1.0+git191117/libtiff/tif_dirread.c
@@ -4891,24 +4891,6 @@ TIFFFetchDirectory(TIFF* tif, uint64 dir
dircount16 = (uint16)dircount64;
dirsize = 20;
}
- const uint64 allocsize = (uint64)dircount16 * dirsize;
- if (allocsize > 100 * 1024 * 1024)
- {
- /* Before allocating a huge amount of memory for corrupted files,
- * check if size of requested memory is not greater than file size.
- */
- const uint64 filesize = TIFFGetFileSize(tif);
- if (allocsize > filesize)
- {
- TIFFWarningExt(
- tif->tif_clientdata, module,
- "Requested memory size for TIFF directory of %" PRIu64
- " is greater than filesize %" PRIu64
- ". Memory not allocated, TIFF directory not read",
- allocsize, filesize);
- return 0;
- }
- }
origdir = _TIFFCheckMalloc(tif, dircount16,
dirsize, "to read TIFF directory");
if (origdir == NULL)

View File

@@ -0,0 +1,94 @@
[Ubuntu note: Backport of the following patch from upstream, with a few changes
to match the current version of the file in the present Ubuntu release:
. using TIFFWarningExt instead of TIFFWarningExtR (the latter did not exist yet);
. using uint64 instead of uint64_t to preserve the current code usage;
. calling _TIFFfree(data) instead of _TIFFfreeExt(tif, data) (the latter did not exist yet);
-- Rodrigo Figueiredo Zaiden]
Backport of:
From dbb825a8312f30e63a06c272010967d51af5c35a Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Tue, 31 Oct 2023 21:30:58 +0100
Subject: [PATCH] tif_dirread.c: only issue TIFFGetFileSize() for large enough
RAM requests
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/tiff/tree/debian/patches/CVE-2023-6277-4.patch?h=ubuntu/focal-security
Upstream commit https://gitlab.com/libtiff/libtiff/-/commit/dbb825a8312f30e63a06c272010967d51af5c35a]
CVE: CVE-2023-6277
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
libtiff/tif_dirread.c | 54 +++++++++++++++++++++++++------------------
1 file changed, 31 insertions(+), 23 deletions(-)
--- tiff-4.1.0+git191117.orig/libtiff/tif_dirread.c
+++ tiff-4.1.0+git191117/libtiff/tif_dirread.c
@@ -5822,19 +5822,24 @@ TIFFFetchStripThing(TIFF* tif, TIFFDirEn
_TIFFfree(data);
return(0);
}
- /* Before allocating a huge amount of memory for corrupted files, check
- * if size of requested memory is not greater than file size. */
- uint64 filesize = TIFFGetFileSize(tif);
- uint64 allocsize = (uint64)nstrips * sizeof(uint64);
- if (allocsize > filesize)
+ const uint64 allocsize = (uint64)nstrips * sizeof(uint64);
+ if (allocsize > 100 * 1024 * 1024)
{
- TIFFWarningExt(tif->tif_clientdata, module,
- "Requested memory size for StripArray of %" PRIu64
- " is greather than filesize %" PRIu64
- ". Memory not allocated",
- allocsize, filesize);
- _TIFFfree(data);
- return (0);
+ /* Before allocating a huge amount of memory for corrupted files,
+ * check if size of requested memory is not greater than file size.
+ */
+ const uint64 filesize = TIFFGetFileSize(tif);
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(
+ tif->tif_clientdata, module,
+ "Requested memory size for StripArray of %" PRIu64
+ " is greater than filesize %" PRIu64
+ ". Memory not allocated",
+ allocsize, filesize);
+ _TIFFfree(data);
+ return (0);
+ }
}
resizeddata=(uint64*)_TIFFCheckMalloc(tif,nstrips,sizeof(uint64),"for strip array");
if (resizeddata==0) {
@@ -5935,17 +5940,20 @@ static void allocChoppedUpStripArrays(TI
* size of StripByteCount and StripOffset tags is not greater than
* file size.
*/
- uint64 allocsize = (uint64)nstrips * sizeof(uint64) * 2;
- uint64 filesize = TIFFGetFileSize(tif);
- if (allocsize > filesize)
- {
- TIFFWarningExt(tif->tif_clientdata, "allocChoppedUpStripArrays",
- "Requested memory size for StripByteCount and "
- "StripOffsets %" PRIu64
- " is greather than filesize %" PRIu64
- ". Memory not allocated",
- allocsize, filesize);
- return;
+ const uint64 allocsize = (uint64)nstrips * sizeof(uint64) * 2;
+ if (allocsize > 100 * 1024 * 1024)
+ {
+ const uint64 filesize = TIFFGetFileSize(tif);
+ if (allocsize > filesize)
+ {
+ TIFFWarningExt(tif->tif_clientdata, "allocChoppedUpStripArrays",
+ "Requested memory size for StripByteCount and "
+ "StripOffsets %" PRIu64
+ " is greater than filesize %" PRIu64
+ ". Memory not allocated",
+ allocsize, filesize);
+ return;
+ }
}
newcounts = (uint64*) _TIFFCheckMalloc(tif, nstrips, sizeof (uint64),

View File

@@ -49,6 +49,11 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
file://CVE-2023-41175.patch \
file://CVE-2022-40090.patch \
file://CVE-2023-6228.patch \
file://CVE-2023-6277-1.patch \
file://CVE-2023-6277-2.patch \
file://CVE-2023-6277-3.patch \
file://CVE-2023-6277-4.patch \
file://CVE-2023-52356.patch \
"
SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424"
SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634"

View File

@@ -0,0 +1,88 @@
Backport of:
From deca8039991886a559b67bcd6701db800a5cf764 Mon Sep 17 00:00:00 2001
From: Stefan Eissing <stefan@eissing.org>
Date: Wed, 6 Mar 2024 09:36:08 +0100
Subject: [PATCH] http2: push headers better cleanup
- provide common cleanup method for push headers
Closes #13054
Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/curl/tree/debian/patches/CVE-2024-2398.patch?h=ubuntu/focal-security
Upstream commit https://github.com/curl/curl/commit/deca8039991886a559b67bcd6701db800a5cf764]
CVE: CVE-2024-2398
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
lib/http2.c | 34 +++++++++++++++-------------------
1 file changed, 15 insertions(+), 19 deletions(-)
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -515,6 +515,15 @@ static struct Curl_easy *duphandle(struc
}
+static void free_push_headers(struct HTTP *stream)
+{
+ size_t i;
+ for(i = 0; i<stream->push_headers_used; i++)
+ free(stream->push_headers[i]);
+ Curl_safefree(stream->push_headers);
+ stream->push_headers_used = 0;
+}
+
static int push_promise(struct Curl_easy *data,
struct connectdata *conn,
const nghttp2_push_promise *frame)
@@ -528,7 +537,6 @@ static int push_promise(struct Curl_easy
struct curl_pushheaders heads;
CURLMcode rc;
struct http_conn *httpc;
- size_t i;
/* clone the parent */
struct Curl_easy *newhandle = duphandle(data);
if(!newhandle) {
@@ -557,11 +565,7 @@ static int push_promise(struct Curl_easy
Curl_set_in_callback(data, false);
/* free the headers again */
- for(i = 0; i<stream->push_headers_used; i++)
- free(stream->push_headers[i]);
- free(stream->push_headers);
- stream->push_headers = NULL;
- stream->push_headers_used = 0;
+ free_push_headers(stream);
if(rv) {
/* denied, kill off the new handle again */
@@ -995,10 +999,10 @@ static int on_header(nghttp2_session *se
stream->push_headers_alloc) {
char **headp;
stream->push_headers_alloc *= 2;
- headp = Curl_saferealloc(stream->push_headers,
- stream->push_headers_alloc * sizeof(char *));
+ headp = realloc(stream->push_headers,
+ stream->push_headers_alloc * sizeof(char *));
if(!headp) {
- stream->push_headers = NULL;
+ free_push_headers(stream);
return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
}
stream->push_headers = headp;
@@ -1179,14 +1183,7 @@ void Curl_http2_done(struct Curl_easy *d
if(http->header_recvbuf) {
Curl_add_buffer_free(&http->header_recvbuf);
Curl_add_buffer_free(&http->trailer_recvbuf);
- if(http->push_headers) {
- /* if they weren't used and then freed before */
- for(; http->push_headers_used > 0; --http->push_headers_used) {
- free(http->push_headers[http->push_headers_used - 1]);
- }
- free(http->push_headers);
- http->push_headers = NULL;
- }
+ free_push_headers(http);
}
if(!httpc->h2) /* not HTTP/2 ? */

View File

@@ -58,6 +58,7 @@ SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \
file://CVE-2023-28321.patch \
file://CVE-2023-28322.patch \
file://CVE-2023-46218.patch \
file://CVE-2024-2398.patch \
"
SRC_URI[md5sum] = "ec5fc263f898a3dfef08e805f1ecca42"
@@ -72,6 +73,9 @@ CVE_CHECK_WHITELIST = "CVE-2021-22922 CVE-2021-22923 CVE-2021-22926 CVE-2021-229
# This CVE issue affects Windows only Hence whitelisting this CVE
CVE_CHECK_WHITELIST += "CVE-2021-22897"
# This CVE reports that apple had to upgrade curl because of other already reported CVEs
CVE_CHECK_WHITELIST += "CVE-2023-42915"
inherit autotools pkgconfig binconfig multilib_header
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib"

View File

@@ -0,0 +1,206 @@
Backport of:
From 29d6298d0b04cfff970b993915db71ba3f580b6d Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
Date: Mon, 23 Oct 2023 09:26:57 +0900
Subject: [PATCH] auth/rsa_psk: side-step potential side-channel
This removes branching that depends on secret data, porting changes
for regular RSA key exchange from
4804febddc2ed958e5ae774de2a8f85edeeff538 and
80a6ce8ddb02477cd724cd5b2944791aaddb702a. This also removes the
allow_wrong_pms as it was used sorely to control debug output
depending on the branching.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Upstream-Status: Backport [https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gnutls28/3.6.13-2ubuntu1.9/gnutls28_3.6.13-2ubuntu1.9.debian.tar.xz
Upstream-Commit: https://gitlab.com/gnutls/gnutls/-/commit/29d6298d0b04cfff970b993915db71ba3f580b6d]
CVE: CVE-2023-5981
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
lib/auth/rsa.c | 2 +-
lib/auth/rsa_psk.c | 90 ++++++++++++++++++----------------------------
lib/gnutls_int.h | 4 ---
lib/priority.c | 1 -
4 files changed, 35 insertions(+), 62 deletions(-)
--- a/lib/auth/rsa.c
+++ b/lib/auth/rsa.c
@@ -207,7 +207,7 @@ proc_rsa_client_kx(gnutls_session_t sess
session->key.key.size);
/* After this point, any conditional on failure that cause differences
* in execution may create a timing or cache access pattern side
- * channel that can be used as an oracle, so treat very carefully */
+ * channel that can be used as an oracle, so tread carefully */
/* Error handling logic:
* In case decryption fails then don't inform the peer. Just use the
--- a/lib/auth/rsa_psk.c
+++ b/lib/auth/rsa_psk.c
@@ -264,14 +264,13 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_se
{
gnutls_datum_t username;
psk_auth_info_t info;
- gnutls_datum_t plaintext;
gnutls_datum_t ciphertext;
gnutls_datum_t pwd_psk = { NULL, 0 };
int ret, dsize;
- int randomize_key = 0;
ssize_t data_size = _data_size;
gnutls_psk_server_credentials_t cred;
gnutls_datum_t premaster_secret = { NULL, 0 };
+ volatile uint8_t ver_maj, ver_min;
cred = (gnutls_psk_server_credentials_t)
_gnutls_get_cred(session, GNUTLS_CRD_PSK);
@@ -327,71 +326,47 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_se
}
ciphertext.size = dsize;
- ret =
- gnutls_privkey_decrypt_data(session->internals.selected_key, 0,
- &ciphertext, &plaintext);
- if (ret < 0 || plaintext.size != GNUTLS_MASTER_SIZE) {
- /* In case decryption fails then don't inform
- * the peer. Just use a random key. (in order to avoid
- * attack against pkcs-1 formatting).
- */
- gnutls_assert();
- _gnutls_debug_log
- ("auth_rsa_psk: Possible PKCS #1 format attack\n");
- if (ret >= 0) {
- gnutls_free(plaintext.data);
- }
- randomize_key = 1;
- } else {
- /* If the secret was properly formatted, then
- * check the version number.
- */
- if (_gnutls_get_adv_version_major(session) !=
- plaintext.data[0]
- || (session->internals.allow_wrong_pms == 0
- && _gnutls_get_adv_version_minor(session) !=
- plaintext.data[1])) {
- /* No error is returned here, if the version number check
- * fails. We proceed normally.
- * That is to defend against the attack described in the paper
- * "Attacking RSA-based sessions in SSL/TLS" by Vlastimil Klima,
- * Ondej Pokorny and Tomas Rosa.
- */
- gnutls_assert();
- _gnutls_debug_log
- ("auth_rsa: Possible PKCS #1 version check format attack\n");
- }
- }
+ ver_maj = _gnutls_get_adv_version_major(session);
+ ver_min = _gnutls_get_adv_version_minor(session);
+ premaster_secret.data = gnutls_malloc(GNUTLS_MASTER_SIZE);
+ if (premaster_secret.data == NULL) {
+ gnutls_assert();
+ return GNUTLS_E_MEMORY_ERROR;
+ }
+ premaster_secret.size = GNUTLS_MASTER_SIZE;
- if (randomize_key != 0) {
- premaster_secret.size = GNUTLS_MASTER_SIZE;
- premaster_secret.data =
- gnutls_malloc(premaster_secret.size);
- if (premaster_secret.data == NULL) {
- gnutls_assert();
- return GNUTLS_E_MEMORY_ERROR;
- }
-
- /* we do not need strong random numbers here.
- */
- ret = gnutls_rnd(GNUTLS_RND_NONCE, premaster_secret.data,
- premaster_secret.size);
- if (ret < 0) {
- gnutls_assert();
- goto cleanup;
- }
- } else {
- premaster_secret.data = plaintext.data;
- premaster_secret.size = plaintext.size;
+ /* Fallback value when decryption fails. Needs to be unpredictable. */
+ ret = gnutls_rnd(GNUTLS_RND_NONCE, premaster_secret.data,
+ premaster_secret.size);
+ if (ret < 0) {
+ gnutls_assert();
+ goto cleanup;
}
+ gnutls_privkey_decrypt_data2(session->internals.selected_key, 0,
+ &ciphertext, premaster_secret.data,
+ premaster_secret.size);
+ /* After this point, any conditional on failure that cause differences
+ * in execution may create a timing or cache access pattern side
+ * channel that can be used as an oracle, so tread carefully */
+
+ /* Error handling logic:
+ * In case decryption fails then don't inform the peer. Just use the
+ * random key previously generated. (in order to avoid attack against
+ * pkcs-1 formatting).
+ *
+ * If we get version mismatches no error is returned either. We
+ * proceed normally. This is to defend against the attack described
+ * in the paper "Attacking RSA-based sessions in SSL/TLS" by
+ * Vlastimil Klima, Ondej Pokorny and Tomas Rosa.
+ */
+
/* This is here to avoid the version check attack
* discussed above.
*/
-
- premaster_secret.data[0] = _gnutls_get_adv_version_major(session);
- premaster_secret.data[1] = _gnutls_get_adv_version_minor(session);
+ premaster_secret.data[0] = ver_maj;
+ premaster_secret.data[1] = ver_min;
/* find the key of this username
*/
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -989,7 +989,6 @@ struct gnutls_priority_st {
bool _no_etm;
bool _no_ext_master_secret;
bool _allow_key_usage_violation;
- bool _allow_wrong_pms;
bool _dumbfw;
unsigned int _dh_prime_bits; /* old (deprecated) variable */
@@ -1007,7 +1006,6 @@ struct gnutls_priority_st {
(x)->no_etm = 1; \
(x)->no_ext_master_secret = 1; \
(x)->allow_key_usage_violation = 1; \
- (x)->allow_wrong_pms = 1; \
(x)->dumbfw = 1
#define ENABLE_PRIO_COMPAT(x) \
@@ -1016,7 +1014,6 @@ struct gnutls_priority_st {
(x)->_no_etm = 1; \
(x)->_no_ext_master_secret = 1; \
(x)->_allow_key_usage_violation = 1; \
- (x)->_allow_wrong_pms = 1; \
(x)->_dumbfw = 1
/* DH and RSA parameters types.
@@ -1141,7 +1138,6 @@ typedef struct {
bool no_etm;
bool no_ext_master_secret;
bool allow_key_usage_violation;
- bool allow_wrong_pms;
bool dumbfw;
/* old (deprecated) variable. This is used for both srp_prime_bits
--- a/lib/priority.c
+++ b/lib/priority.c
@@ -681,7 +681,6 @@ gnutls_priority_set(gnutls_session_t ses
COPY_TO_INTERNALS(no_etm);
COPY_TO_INTERNALS(no_ext_master_secret);
COPY_TO_INTERNALS(allow_key_usage_violation);
- COPY_TO_INTERNALS(allow_wrong_pms);
COPY_TO_INTERNALS(dumbfw);
COPY_TO_INTERNALS(dh_prime_bits);

View File

@@ -0,0 +1,125 @@
From 40dbbd8de499668590e8af51a15799fbc430595e Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@gnu.org>
Date: Wed, 10 Jan 2024 19:13:17 +0900
Subject: [PATCH] rsa-psk: minimize branching after decryption
This moves any non-trivial code between gnutls_privkey_decrypt_data2
and the function return in _gnutls_proc_rsa_psk_client_kx up until the
decryption. This also avoids an extra memcpy to session->key.key.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
Upstream-Status: Backport [https://gitlab.com/gnutls/gnutls/-/commit/40dbbd8de499668590e8af51a15799fbc430595e]
CVE: CVE-2024-0553
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
lib/auth/rsa_psk.c | 68 ++++++++++++++++++++++++----------------------
1 file changed, 35 insertions(+), 33 deletions(-)
diff --git a/lib/auth/rsa_psk.c b/lib/auth/rsa_psk.c
index 93c2dc9..c6cfb92 100644
--- a/lib/auth/rsa_psk.c
+++ b/lib/auth/rsa_psk.c
@@ -269,7 +269,6 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_session_t session, uint8_t * data,
int ret, dsize;
ssize_t data_size = _data_size;
gnutls_psk_server_credentials_t cred;
- gnutls_datum_t premaster_secret = { NULL, 0 };
volatile uint8_t ver_maj, ver_min;
cred = (gnutls_psk_server_credentials_t)
@@ -329,24 +328,48 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_session_t session, uint8_t * data,
ver_maj = _gnutls_get_adv_version_major(session);
ver_min = _gnutls_get_adv_version_minor(session);
- premaster_secret.data = gnutls_malloc(GNUTLS_MASTER_SIZE);
- if (premaster_secret.data == NULL) {
+ /* Find the key of this username. A random value will be
+ * filled in if the key is not found.
+ */
+ ret = _gnutls_psk_pwd_find_entry(session, info->username,
+ strlen(info->username), &pwd_psk);
+ if (ret < 0)
+ return gnutls_assert_val(ret);
+
+ /* Allocate memory for premaster secret, and fill in the
+ * fields except the decryption result.
+ */
+ session->key.key.size = 2 + GNUTLS_MASTER_SIZE + 2 + pwd_psk.size;
+ session->key.key.data = gnutls_malloc(session->key.key.size);
+ if (session->key.key.data == NULL) {
gnutls_assert();
+ _gnutls_free_key_datum(&pwd_psk);
+ /* No need to zeroize, as the secret is not copied in yet */
+ _gnutls_free_datum(&session->key.key);
return GNUTLS_E_MEMORY_ERROR;
}
- premaster_secret.size = GNUTLS_MASTER_SIZE;
/* Fallback value when decryption fails. Needs to be unpredictable. */
- ret = gnutls_rnd(GNUTLS_RND_NONCE, premaster_secret.data,
- premaster_secret.size);
+ ret = gnutls_rnd(GNUTLS_RND_NONCE, session->key.key.data + 2,
+ GNUTLS_MASTER_SIZE);
if (ret < 0) {
gnutls_assert();
- goto cleanup;
+ _gnutls_free_key_datum(&pwd_psk);
+ /* No need to zeroize, as the secret is not copied in yet */
+ _gnutls_free_datum(&session->key.key);
+ return ret;
}
+ _gnutls_write_uint16(GNUTLS_MASTER_SIZE, session->key.key.data);
+ _gnutls_write_uint16(pwd_psk.size,
+ &session->key.key.data[2 + GNUTLS_MASTER_SIZE]);
+ memcpy(&session->key.key.data[2 + GNUTLS_MASTER_SIZE + 2], pwd_psk.data,
+ pwd_psk.size);
+ _gnutls_free_key_datum(&pwd_psk);
+
gnutls_privkey_decrypt_data2(session->internals.selected_key, 0,
- &ciphertext, premaster_secret.data,
- premaster_secret.size);
+ &ciphertext, session->key.key.data + 2,
+ GNUTLS_MASTER_SIZE);
/* After this point, any conditional on failure that cause differences
* in execution may create a timing or cache access pattern side
* channel that can be used as an oracle, so tread carefully */
@@ -365,31 +388,10 @@ _gnutls_proc_rsa_psk_client_kx(gnutls_session_t session, uint8_t * data,
/* This is here to avoid the version check attack
* discussed above.
*/
- premaster_secret.data[0] = ver_maj;
- premaster_secret.data[1] = ver_min;
+ session->key.key.data[2] = ver_maj;
+ session->key.key.data[3] = ver_min;
- /* find the key of this username
- */
- ret =
- _gnutls_psk_pwd_find_entry(session, info->username, strlen(info->username), &pwd_psk);
- if (ret < 0) {
- gnutls_assert();
- goto cleanup;
- }
-
- ret =
- set_rsa_psk_session_key(session, &pwd_psk, &premaster_secret);
- if (ret < 0) {
- gnutls_assert();
- goto cleanup;
- }
-
- ret = 0;
- cleanup:
- _gnutls_free_key_datum(&pwd_psk);
- _gnutls_free_temp_key_datum(&premaster_secret);
-
- return ret;
+ return 0;
}
static int
--
2.25.1

View File

@@ -28,6 +28,8 @@ SRC_URI = "https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar
file://CVE-2022-2509.patch \
file://CVE-2021-4209.patch \
file://CVE-2023-0361.patch \
file://CVE-2023-5981.patch \
file://CVE-2024-0553.patch \
"
SRC_URI[sha256sum] = "5630751adec7025b8ef955af4d141d00d252a985769f51b4059e5affa3d39d63"

View File

@@ -0,0 +1,46 @@
From eab426c5fba69d2c77023939f72b4ad446834e3c Mon Sep 17 00:00:00 2001
From: dan <Dan Kennedy>
Date: Thu, 7 Sep 2023 13:53:09 +0000
Subject: [PATCH] Fix a buffer overread in the sessions extension that could occur when processing a corrupt changeset.
Upstream-Status: Backport [https://sqlite.org/src/info/0e4e7a05c4204b47]
CVE: CVE-2023-7104
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
sqlite3.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/sqlite3.c b/sqlite3.c
index 972ef18..c645ac8 100644
--- a/sqlite3.c
+++ b/sqlite3.c
@@ -203301,15 +203301,19 @@ static int sessionReadRecord(
}
}
if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
- sqlite3_int64 v = sessionGetI64(aVal);
- if( eType==SQLITE_INTEGER ){
- sqlite3VdbeMemSetInt64(apOut[i], v);
+ if( (pIn->nData-pIn->iNext)<8 ){
+ rc = SQLITE_CORRUPT_BKPT;
}else{
- double d;
- memcpy(&d, &v, 8);
- sqlite3VdbeMemSetDouble(apOut[i], d);
+ sqlite3_int64 v = sessionGetI64(aVal);
+ if( eType==SQLITE_INTEGER ){
+ sqlite3VdbeMemSetInt64(apOut[i], v);
+ }else{
+ double d;
+ memcpy(&d, &v, 8);
+ sqlite3VdbeMemSetDouble(apOut[i], d);
+ }
+ pIn->iNext += 8;
}
- pIn->iNext += 8;
}
}
}
--
2.25.1

View File

@@ -17,6 +17,7 @@ SRC_URI = "http://www.sqlite.org/2020/sqlite-autoconf-${SQLITE_PV}.tar.gz \
file://CVE-2020-35525.patch \
file://CVE-2020-35527.patch \
file://CVE-2021-20223.patch \
file://CVE-2023-7104.patch \
"
SRC_URI[md5sum] = "2d0a553534c521504e3ac3ad3b90f125"
SRC_URI[sha256sum] = "62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae"

View File

@@ -19,8 +19,8 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \
file://no-path-adjust.patch \
"
PV .= ".2130"
SRCREV = "075ad7047457debfeef13442c01e74088b461092"
PV .= ".2190"
SRCREV = "6a950da86d7a6eb09d5ebeab17657986420d07ac"
# Do not consider .z in x.y.z, as that is updated with every commit
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+)\.0"