public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, linux-xfs@vger.kernel.org,
	"Darrick J. Wong" <djwong@kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	Catherine Hoang <catherine.hoang@oracle.com>
Subject: [PATCH 6.6 030/124] xfs: check shortform attr entry flags specifically
Date: Mon, 21 Oct 2024 12:23:54 +0200	[thread overview]
Message-ID: <20241021102257.892283414@linuxfoundation.org> (raw)
In-Reply-To: <20241021102256.706334758@linuxfoundation.org>

6.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "Darrick J. Wong" <djwong@kernel.org>

commit 309dc9cbbb4379241bcc9b5a6a42c04279a0e5a7 upstream.

While reviewing flag checking in the attr scrub functions, we noticed
that the shortform attr scanner didn't catch entries that have the LOCAL
or INCOMPLETE bits set.  Neither of these flags can ever be set on a
shortform attr, so we need to check this narrower set of valid flags.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/xfs/scrub/attr.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/fs/xfs/scrub/attr.c
+++ b/fs/xfs/scrub/attr.c
@@ -566,6 +566,15 @@ xchk_xattr_check_sf(
 			break;
 		}
 
+		/*
+		 * Shortform entries do not set LOCAL or INCOMPLETE, so the
+		 * only valid flag bits here are for namespaces.
+		 */
+		if (sfe->flags & ~XFS_ATTR_NSP_ONDISK_MASK) {
+			xchk_fblock_set_corrupt(sc, XFS_ATTR_FORK, 0);
+			break;
+		}
+
 		if (!xchk_xattr_set_map(sc, ab->usedmap,
 				(char *)sfe - (char *)sf,
 				sizeof(struct xfs_attr_sf_entry))) {



  parent reply	other threads:[~2024-10-21 10:35 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 10:23 [PATCH 6.6 000/124] 6.6.58-rc1 review Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 001/124] btrfs: fix uninitialized pointer free in add_inode_ref() Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 002/124] btrfs: fix uninitialized pointer free on read_alloc_one_name() error Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 003/124] ksmbd: fix user-after-free from session log off Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 004/124] ALSA: hda/conexant - Fix audio routing for HP EliteOne 1000 G2 Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 005/124] mptcp: pm: fix UaF read in mptcp_pm_nl_rm_addr_or_subflow Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 006/124] net: enetc: remove xdp_drops statistic from enetc_xdp_drop() Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 007/124] net: enetc: block concurrent XDP transmissions during ring reconfiguration Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 008/124] net: enetc: disable Tx BD rings after they are empty Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 009/124] net: enetc: disable NAPI after all rings are disabled Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 010/124] net: enetc: add missing static descriptor and inline keyword Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 011/124] posix-clock: Fix missing timespec64 check in pc_clock_settime() Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 012/124] arm64: probes: Remove broken LDR (literal) uprobe support Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 013/124] arm64: probes: Fix simulate_ldr*_literal() Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 014/124] arm64: probes: Fix uprobes for big-endian kernels Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 015/124] net: macb: Avoid 20s boot delay by skipping MDIO bus registration for fixed-link PHY Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 016/124] net: microchip: vcap api: Fix memory leaks in vcap_api_encode_rule_test() Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 017/124] irqchip/gic-v3-its: Fix VSYNC referencing an unmapped VPE on GIC v4.1 Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 018/124] fat: fix uninitialized variable Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 019/124] selftests/mm: replace atomic_bool with pthread_barrier_t Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 020/124] selftests/mm: fix deadlock for fork after pthread_create on ARM Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 021/124] mm/mremap: fix move_normal_pmd/retract_page_tables race Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 022/124] mm/mglru: only clear kswapd_failures if reclaimable Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 023/124] mm/swapfile: skip HugeTLB pages for unuse_vma Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 024/124] xfs: fix error returns from xfs_bmapi_write Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 025/124] xfs: fix xfs_bmap_add_extent_delay_real for partial conversions Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 026/124] xfs: remove a racy if_bytes check in xfs_reflink_end_cow_extent Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 027/124] xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item recovery Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 028/124] xfs: check opcode and iovec count match in xlog_recover_attri_commit_pass2 Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 029/124] xfs: fix missing check for invalid attr flags Greg Kroah-Hartman
2024-10-21 10:23 ` Greg Kroah-Hartman [this message]
2024-10-21 10:23 ` [PATCH 6.6 031/124] xfs: validate recovered name buffers when recovering xattr items Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 032/124] xfs: enforce one namespace per attribute Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 033/124] xfs: revert commit 44af6c7e59b12 Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 034/124] xfs: use dontcache for grabbing inodes during scrub Greg Kroah-Hartman
2024-10-21 10:23 ` [PATCH 6.6 035/124] xfs: match lock mode in xfs_buffered_write_iomap_begin() Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 036/124] xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 037/124] xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 038/124] xfs: convert delayed extents to unwritten when zeroing post eof blocks Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 039/124] xfs: allow symlinks with short remote targets Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 040/124] xfs: make sure sb_fdblocks is non-negative Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 041/124] xfs: fix unlink vs cluster buffer instantiation race Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 042/124] xfs: fix freeing speculative preallocations for preallocated files Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 043/124] xfs: allow unlinked symlinks and dirs with zero size Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 044/124] xfs: restrict when we try to align cow fork delalloc to cowextsz hints Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 045/124] maple_tree: correct tree corruption on spanning store Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 046/124] net: fec: Move `fec_ptp_read()` to the top of the file Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 047/124] net: fec: Remove duplicated code Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 048/124] mptcp: prevent MPC handshake on port-based signal endpoints Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 049/124] iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 050/124] s390/sclp: Deactivate sclp after all its users Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 051/124] s390/sclp_vt220: Convert newlines to CRLF instead of LFCR Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 052/124] KVM: s390: gaccess: Check if guest address is in memslot Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 053/124] KVM: s390: Change virtual to physical address access in diag 0x258 handler Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 054/124] x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 055/124] x86/cpufeatures: Add a IBPB_NO_RET BUG flag Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 056/124] x86/entry: Have entry_ibpb() invalidate return predictions Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 057/124] x86/bugs: Skip RSB fill at VMEXIT Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 058/124] x86/bugs: Do not use UNTRAIN_RET with IBPB on entry Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 059/124] blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 060/124] io_uring/sqpoll: close race on waiting for sqring entries Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 061/124] ublk: dont allow user copy for unprivileged device Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 062/124] selftest: hid: add the missing tests directory Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 063/124] Input: xpad - add support for MSI Claw A1M Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 064/124] scsi: ufs: core: Set SDEV_OFFLINE when UFS is shut down Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 065/124] scsi: ufs: core: Fix the issue of ICU failure Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 066/124] drm/radeon: Fix encoder->possible_clones Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 067/124] drm/vmwgfx: Handle surface check failure correctly Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 068/124] drm/amdgpu/swsmu: Only force workload setup on init Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 069/124] drm/amdgpu: prevent BO_HANDLES error from being overwritten Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 070/124] iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 071/124] iio: dac: ltc1660: " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 072/124] iio: dac: stm32-dac-core: add missing select REGMAP_MMIO " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 073/124] iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 074/124] iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 075/124] iio: light: veml6030: fix ALS sensor resolution Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 076/124] iio: light: veml6030: fix IIO device retrieval from embedded device Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 077/124] iio: light: opt3001: add missing full-scale range value Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 078/124] iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 079/124] iio: frequency: adf4377: add missing select REMAP_SPI " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 080/124] iio: light: bu27008: add missing select IIO_(TRIGGERED_)BUFFER " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 081/124] iio: dac: ad5766: " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 082/124] iio: proximity: mb1232: " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 083/124] iio: dac: ad3552r: " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 084/124] iio: adc: ti-lmp92064: add missing select REGMAP_SPI " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 085/124] iio: adc: ti-ads124s08: add missing select IIO_(TRIGGERED_)BUFFER " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 086/124] iio: accel: kx022a: " Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 087/124] Bluetooth: Call iso_exit() on module unload Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 088/124] Bluetooth: Remove debugfs directory on module init failure Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 089/124] Bluetooth: ISO: Fix multiple init when debugfs is disabled Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 090/124] Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001 Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 091/124] vt: prevent kernel-infoleak in con_font_get() Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 092/124] xhci: tegra: fix checked USB2 port number Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 093/124] xhci: Fix incorrect stream context type macro Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 094/124] xhci: Mitigate failed set dequeue pointer commands Greg Kroah-Hartman
2024-10-21 10:24 ` [PATCH 6.6 095/124] USB: serial: option: add support for Quectel EG916Q-GL Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 096/124] USB: serial: option: add Telit FN920C04 MBIM compositions Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 097/124] usb: typec: qcom-pmic-typec: fix sink status being overwritten with RP_DEF Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 098/124] usb: dwc3: Wait for EndXfer completion before restoring GUSB2PHYCFG Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 099/124] misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for EEPROM device Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 100/124] misc: microchip: pci1xxxx: add support for NVMEM_DEVID_AUTO for OTP device Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 101/124] serial: imx: Update mctrl old_status on RTSD interrupt Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 102/124] parport: Proper fix for array out-of-bounds access Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 103/124] x86/resctrl: Annotate get_mem_config() functions as __init Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 104/124] x86/apic: Always explicitly disarm TSC-deadline timer Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 105/124] x86/CPU/AMD: Only apply Zenbleed fix for Zen2 during late microcode load Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 106/124] x86/entry_32: Do not clobber user EFLAGS.ZF Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 107/124] x86/entry_32: Clear CPU buffers after register restore in NMI return Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 108/124] tty: n_gsm: Fix use-after-free in gsm_cleanup_mux Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 109/124] x86/bugs: Use code segment selector for VERW operand Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 110/124] pinctrl: ocelot: fix system hang on level based interrupts Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 111/124] pinctrl: stm32: check devm_kasprintf() returned value Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 112/124] pinctrl: apple: " Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 113/124] irqchip/gic-v4: Dont allow a VMOVP on a dying VPE Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 114/124] irqchip/sifive-plic: Unmask interrupt in plic_irq_enable() Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 115/124] serial: qcom-geni: fix polled console initialisation Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 116/124] serial: qcom-geni: revert broken hibernation support Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 117/124] serial: qcom-geni: fix dma rx cancellation Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 118/124] serial: qcom-geni: fix receiver enable Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 119/124] tcp: fix mptcp DSS corruption due to large pmtu xmit Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 120/124] selftests: mptcp: join: change capture/checksum as bool Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 121/124] selftests: mptcp: join: test for prohibited MPC to port-based endp Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 122/124] selftests: mptcp: remove duplicated variables Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 123/124] nilfs2: propagate directory read errors from nilfs_find_entry() Greg Kroah-Hartman
2024-10-21 10:25 ` [PATCH 6.6 124/124] ALSA: hda/conexant - Use cached pin control for Node 0x1d on HP EliteOne 1000 G2 Greg Kroah-Hartman
2024-10-21 18:08 ` [PATCH 6.6 000/124] 6.6.58-rc1 review SeongJae Park
2024-10-21 19:51 ` Florian Fainelli
2024-10-21 19:57 ` Naresh Kamboju
2024-10-21 20:00 ` Harshit Mogalapalli
2024-10-21 22:33 ` Shuah Khan
2024-10-21 23:05 ` Mark Brown
2024-10-22 13:08 ` Takeshi Ogasawara
2024-10-22 17:56 ` Jon Hunter
2024-10-23 10:18   ` Jon Hunter
2024-10-23  7:18 ` Muhammad Usama Anjum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241021102257.892283414@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=catherine.hoang@oracle.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox