- 16 11月, 2022 40 次提交
-
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.17-rc1 commit a58b45a4 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/a58b45a4dbfd ------------------------------- Set RSS capable in FSCTL_QUERY_NETWORK_INTERFACE_INFO if netdev has multi tx queues. And add ksmbd_compare_user() to avoid racy condition issue in ksmbd_free_user(). because windows client is simultaneously used to send session setup requests for multichannel connection. Tested-by: NZiwei Xie <zw.xie@high-flyer.cn> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Marios Makassikis 提交于
mainline inclusion from mainline-5.17-rc1 commit 305f8bda category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/305f8bda15eb ------------------------------- These fields are remnants of the not upstreamed SMB1 code. Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Marios Makassikis 提交于
mainline inclusion from mainline-5.17-rc1 commit 80917f17 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/80917f17e3f9 ------------------------------- The 'share' parameter is no longer used by smb2_get_name() since commit 265fd199 ("ksmbd: use LOOKUP_BENEATH to prevent the out of share access"). Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Marcos Del Sol Vives 提交于
mainline inclusion from mainline-5.16-rc7 commit 83912d6d category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/83912d6d55be ------------------------------- According to the official Microsoft MS-SMB2 document section 3.3.5.4, this flag should be used only for 3.0 and 3.0.2 dialects. Setting it for 3.1.1 is a violation of the specification. This causes my Windows 10 client to detect an anomaly in the negotiation, and disable encryption entirely despite being explicitly enabled in ksmbd, causing all data transfers to go in plain text. Fixes: e2f34481 ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org # v5.15 Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NMarcos Del Sol Vives <marcos@orca.pet> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.16-rc7 commit f2e78aff category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/f2e78affc48d ------------------------------- No check for if "rc" is an error code for build_sec_desc(). This can cause problems with using uninitialized pntsd_size. Fixes: e2f34481 ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org # v5.15 Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc1 commit 777cad16 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/777cad1604d6 ------------------------------- ksmbd is forcing to turn on FS_POSIX_ACL in Kconfig to use vfs acl functions(posix_acl_alloc, get_acl, set_posix_acl). OpenWRT and other platform doesn't use acl and this config is disable by default in kernel. This patch use IS_ENABLED() to know acl config is enable and use acl function if it is enable. Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.16-rc3 commit 178ca6f8 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/178ca6f85aa3 ------------------------------- Fix memleak in get_file_stream_info() Fixes: 34061d6b ("ksmbd: validate OutputBufferLength of QUERY_DIR, QUERY_INFO, IOCTL requests") Cc: stable@vger.kernel.org # v5.15 Reported-by: NCoverity Scan <scan-admin@coverity.com> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.16-rc3 commit 1ec72153 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/1ec72153ff43 ------------------------------- If xattr is not supported like exfat or fat, ksmbd server doesn't contain default data stream in FILE_STREAM_INFORMATION response. It will cause ppt or doc file update issue if local filesystem is such as ones. This patch move goto statement to contain it. Fixes: 9f632331 ("ksmbd: add default data stream name in FILE_STREAM_INFORMATION") Cc: stable@vger.kernel.org # v5.15 Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.16-rc3 commit 8e537d14 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/8e537d1465e7 ------------------------------- While file transfer through windows client, This error flood message happen. This flood message will cause performance degradation and misunderstand server has problem. Fixes: e294f78d ("ksmbd: allow PROTECTED_DACL_SECINFO and UNPROTECTED_DACL_SECINFO addition information in smb2 set info security") Cc: stable@vger.kernel.org # v5.15 Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Christophe JAILLET 提交于
mainline inclusion from mainline-5.16-rc3 commit f8fbfd85 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/f8fbfd85f5c9 ------------------------------- All the error handling paths of 'smb2_sess_setup()' end to 'out_err'. All but the new error handling path added by the commit given in the Fixes tag below. Fix this error handling path and branch to 'out_err' as well. Fixes: 0d994cd4 ("ksmbd: add buffer validation in session setup") Cc: stable@vger.kernel.org # v5.15 Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.16-rc1 commit 2734b692 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/2734b692f7b8 ------------------------------- cifs define LeaseKey as u8 array in structure. To move lease structure to smbfs_common, ksmbd change LeaseKey data type to u8 array. Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.16-rc1 commit 2dd9129f category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/2dd9129f7dec ------------------------------- To move smb2_transform_hdr to smbfs_common, This patch remove smb2_buf_length variable in smb2_transform_hdr. Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.16-rc1 commit cb451720 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/cb4517201b8a ------------------------------- To move smb2_hdr to smbfs_common, This patch remove smb2_buf_length variable in smb2_hdr. Also, declare smb2_get_msg function to get smb2 request/response from ->request/response_buf. Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.16-rc1 commit b53ad810 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/b53ad8107ee8 ------------------------------- When validating request length in ksmbd_check_message, 8byte alignment is not needed for compound request. It can cause wrong validation of request length. Fixes: e2f34481 ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org # v5.15 Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Marios Makassikis 提交于
mainline inclusion from mainline-5.16-rc1 commit 78f1688a category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/78f1688a64cc ------------------------------- The validate_negotiate_info_req struct definition includes an extra field to access the data coming after the header. This causes the check in fsctl_validate_negotiate_info() to count the first element of the array twice. This in turn makes some valid requests fail, depending on whether they include padding or not. Fixes: f7db8fd0 ("ksmbd: add validation in smb2_ioctl") Cc: stable@vger.kernel.org # v5.15 Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Christophe JAILLET 提交于
mainline inclusion from mainline-5.16-rc1 commit e8d585b2 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/e8d585b2f68c ------------------------------- 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E); destroy_workqueue(E); Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Ralph Boehme 提交于
mainline inclusion from mainline-5.16-rc1 commit 341b1601 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/341b16014bf8 ------------------------------- Use cmd helper variable in smb2_get_ksmbd_tcon(). Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Steve French <smfrench@gmail.com> Cc: Hyunchul Lee <hyc.lee@gmail.com> Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NRalph Boehme <slow@samba.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Ralph Boehme 提交于
mainline inclusion from mainline-5.16-rc1 commit b83b2790 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/b83b27909e74 ------------------------------- Use ksmbd_req_buf_next() in ksmbd_smb2_check_message(). Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Steve French <smfrench@gmail.com> Cc: Hyunchul Lee <hyc.lee@gmail.com> Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NRalph Boehme <slow@samba.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Ralph Boehme 提交于
mainline inclusion from mainline-5.16-rc1 commit a088ac85 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/a088ac859f81 ------------------------------- Use ksmbd_req_buf_next() in ksmbd_verify_smb_message(). Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NRalph Boehme <slow@samba.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Marios Makassikis 提交于
mainline inclusion from mainline-5.15-rc7 commit 0d994cd4 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/0d994cd482ee ------------------------------- Make sure the security buffer's length/offset are valid with regards to the packet length. Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NMarios Makassikis <mmakassikis@freebox.fr> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc7 commit 621be84a category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/621be84a9d1f ------------------------------- To avoid dictionary attacks (repeated session setups rapidly sent) to connect to server, ksmbd make a delay of a 5 seconds on session setup failure to make it harder to send enough random connection requests to break into a server if a user insert the wrong password 10 times in a row. Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Hyunchul Lee 提交于
mainline inclusion from mainline-5.15-rc7 commit 34061d6b category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/34061d6b76a4 ------------------------------- Validate OutputBufferLength of QUERY_DIR, QUERY_INFO, IOCTL requests and check the free size of response buffer for these requests. Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Ralph Boehme 提交于
mainline inclusion from mainline-5.15-rc7 commit 7a334887 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/7a3348870500 ------------------------------- smb2_validate_credit_charge() accesses fields in the SMB2 PDU body, but until smb2_calc_size() is called the PDU has not yet been verified to be large enough to access the PDU dynamic part length field. Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NRalph Boehme <slow@samba.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Hyunchul Lee 提交于
mainline inclusion from mainline-5.15-rc7 commit 2ea086e3 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/2ea086e35c3d ------------------------------- Add buffer validation for smb direct. Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc7 commit 4bc59477 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/4bc59477c329 ------------------------------- ksmbd limit read/write/trans buffer size not to exceed maximum 8MB. And set the minimum value of max response buffer size to 64KB. Windows client doesn't send session setup request if ksmbd set max trans/read/write size lower than 64KB in smb2 negotiate. It means windows allow at least 64 KB or more about this value. Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc7 commit dbad6300 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/dbad63001eac ------------------------------- Add the check to validate compound response buffer. Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc7 commit 9a63b999 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/9a63b999ae54 ------------------------------- DataOffset and Length validation can be potencial 32bit overflow. This patch fix it. Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Hyunchul Lee 提交于
mainline inclusion from mainline-5.15-rc7 commit bf8acc9e category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/bf8acc9e10e2 ------------------------------- * Requests except READ, WRITE, IOCTL, INFO, QUERY DIRECOTRY, CANCEL must consume one credit. * If client's granted credits are insufficient, refuse to handle requests. * Windows server 2016 or later grant up to 8192 credits to clients at once. Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc7 commit f7db8fd0 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/f7db8fd03a4b ------------------------------- Add validation for request/response buffer size check in smb2_ioctl and fsctl_copychunk() take copychunk_ioctl_req pointer and the other arguments instead of smb2_ioctl_req structure and remove an unused smb2_ioctl_req argument of fsctl_validate_negotiate_info. Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Cc: Steve French <smfrench@gmail.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc5 commit 64e78755 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/64e787556027 ------------------------------- Marios reported kernel oops from fuse driver when ksmbd call mark_inode_dirty(). This patch directly update ->i_ctime after removing mark_inode_ditry() and notify_change will put inode to dirty list. Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Cc: Hyunchul Lee <hyc.lee@gmail.com> Reported-by: NMarios Makassikis <mmakassikis@freebox.fr> Tested-by: NMarios Makassikis <mmakassikis@freebox.fr> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc5 commit 2db72604 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/2db72604f3ea ------------------------------- Fix version mismatch with out of tree, This updated version will be matched with ksmbd-tools. Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Cc: Steve French <smfrench@gmail.com> Cc: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc5 commit c7705eec category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/c7705eec78c9 ------------------------------- Tom suggested to use buf_data_size that is already calculated, to verify these offsets. Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Suggested-by: NTom Talpey <tom@talpey.com> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc5 commit 51a13873 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/51a1387393d9 ------------------------------- Although ksmbd doesn't send SMB2.0 support in supported dialect list of smb negotiate response, There is the leftover of smb2.0 dialect. This patch remove it not to support SMB2.0 in ksmbd. Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Cc: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc5 commit c2e99d47 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/c2e99d479737 ------------------------------- When invalid data offset and data length in request, ksmbd_smb2_check_message check strictly and doesn't allow to process such requests. Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Reviewed-by: NRalph Boehme <slow@samba.org> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc5 commit 36399990 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/363999901116 ------------------------------- This patch add MAX_STREAM_PROT_LEN macro and check if stream protocol length exceeds maximum value. opencode pdu size check in ksmbd_pdu_size_has_room(). Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Dan Carpenter 提交于
mainline inclusion from mainline-5.15-rc4 commit 87ffb310 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/87ffb310d5e8 ------------------------------- The kmalloc() does not have a NULL check. This code can be re-written slightly cleaner to just use the kstrdup(). Fixes: 265fd199 ("ksmbd: use LOOKUP_BENEATH to prevent the out of share access") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NNamjae Jeon <linkinjeon@kernel.org> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc4 commit 4227f811 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/4227f811cdeb ------------------------------- Validate that the transform and smb request headers are present before checking OriginalMessageSize and SessionId fields. Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: NTom Talpey <tom@talpey.com> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Hyunchul Lee 提交于
mainline inclusion from mainline-5.15-rc4 commit 8f77150c category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/8f77150c15f8 ------------------------------- Add buffer validation for SMB2_CREATE_CONTEXT. Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Reviewed-by: NRalph Boehme <slow@samba.org> Signed-off-by: NHyunchul Lee <hyc.lee@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc4 commit 442ff9eb category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/442ff9ebeb01 ------------------------------- This patch add validation to check request buffer check in smb2 negotiate and fix null pointer deferencing oops in smb3_preauth_hash_rsp() that found from manual test. Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Cc: Hyunchul Lee <hyc.lee@gmail.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: NRalph Boehme <slow@samba.org> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-
由 Namjae Jeon 提交于
mainline inclusion from mainline-5.15-rc4 commit 9496e268 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA Reference: https://git.kernel.org/torvalds/linux/c/9496e268e3af ------------------------------- Add buffer validation in smb2_set_info, and remove unused variable in set_file_basic_info. and smb2_set_info infolevel functions take structure pointer argument. Cc: Tom Talpey <tom@talpey.com> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Cc: Ralph Böhme <slow@samba.org> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: NHyunchul Lee <hyc.lee@gmail.com> Reviewed-by: NRalph Boehme <slow@samba.org> Signed-off-by: NNamjae Jeon <linkinjeon@kernel.org> Signed-off-by: NSteve French <stfrench@microsoft.com> Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
-