File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -2708,6 +2708,13 @@ static int parse_durable_handle_context(struct ksmbd_work *work,
2708
2708
goto out ;
2709
2709
}
2710
2710
2711
+ if (le16_to_cpu (context -> DataOffset ) +
2712
+ le32_to_cpu (context -> DataLength ) <
2713
+ sizeof (struct create_durable_reconn_v2_req )) {
2714
+ err = - EINVAL ;
2715
+ goto out ;
2716
+ }
2717
+
2711
2718
recon_v2 = (struct create_durable_reconn_v2_req * )context ;
2712
2719
persistent_id = recon_v2 -> Fid .PersistentFileId ;
2713
2720
dh_info -> fp = ksmbd_lookup_durable_fd (persistent_id );
@@ -2741,6 +2748,13 @@ static int parse_durable_handle_context(struct ksmbd_work *work,
2741
2748
goto out ;
2742
2749
}
2743
2750
2751
+ if (le16_to_cpu (context -> DataOffset ) +
2752
+ le32_to_cpu (context -> DataLength ) <
2753
+ sizeof (struct create_durable_reconn_req )) {
2754
+ err = - EINVAL ;
2755
+ goto out ;
2756
+ }
2757
+
2744
2758
recon = (struct create_durable_reconn_req * )context ;
2745
2759
persistent_id = recon -> Data .Fid .PersistentFileId ;
2746
2760
dh_info -> fp = ksmbd_lookup_durable_fd (persistent_id );
@@ -2766,6 +2780,13 @@ static int parse_durable_handle_context(struct ksmbd_work *work,
2766
2780
goto out ;
2767
2781
}
2768
2782
2783
+ if (le16_to_cpu (context -> DataOffset ) +
2784
+ le32_to_cpu (context -> DataLength ) <
2785
+ sizeof (struct create_durable_req_v2 )) {
2786
+ err = - EINVAL ;
2787
+ goto out ;
2788
+ }
2789
+
2769
2790
durable_v2_blob =
2770
2791
(struct create_durable_req_v2 * )context ;
2771
2792
ksmbd_debug (SMB , "Request for durable v2 open\n" );
You can’t perform that action at this time.
0 commit comments