Bug 15353 - Temporary smbXsrv_tcon_global.tdb can't be parsed
Summary: Temporary smbXsrv_tcon_global.tdb can't be parsed
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.18.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-06 08:41 UTC by Stefan Metzmacher
Modified: 2023-05-11 07:11 UTC (History)
1 user (show)

See Also:


Attachments
Patch for v4-18-test (11.11 KB, patch)
2023-04-12 13:55 UTC, Stefan Metzmacher
slow: review+
Details
Patch for v4-17-test (11.11 KB, patch)
2023-04-12 13:55 UTC, Stefan Metzmacher
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2023-04-06 08:41:12 UTC
We used to store smbXsrv_tcon_global.tdb records in two steps,
first we created a record in order to allocate the tcon id.
The temporary record had a NULL share_name, which translated
into 0 bytes for the string during ndr_push_smbXsrv_tcon_global0.

The problem is that ndr_pull_smbXsrv_tcon_global0 fails on
this with something like:

Invalid record in smbXsrv_tcon_global.tdb:key '2CA0ED4A' ndr_pull_struct_blob(length=85) - Buffer Size Error

The blob looks like this:

[0000] 00 00 00 00 01 00 00 00   00 00 00 00 00 00 02 00   ........  ........
[0010] 00 00 00 00 4A ED A0 2C   4A ED A0 2C 00 00 00 00   ....J.., J..,....
[0020] F8 4B 00 00 00 00 00 00   00 00 00 00 FF FF FF FF   .K......  ........
[0030] 4D 59 9B 9F 83 F4 35 20   36 D2 B0 82 62 68 D9 01   MY....5 6...bh..
[0040] 00 00 00 00 00 00 00 00   00 00 00 00 00 00 00 00   ........  ........
[0050] 00 00 00 00 00                                      .....
Comment 1 Samba QA Contact 2023-04-12 13:52:04 UTC
This bug was referenced in samba master:

e0e58ed0e2429f01265d544b444bf0e4075549e2
Comment 2 Stefan Metzmacher 2023-04-12 13:55:29 UTC
Created attachment 17862 [details]
Patch for v4-18-test
Comment 3 Stefan Metzmacher 2023-04-12 13:55:57 UTC
Created attachment 17863 [details]
Patch for v4-17-test
Comment 4 Ralph Böhme 2023-04-13 10:05:06 UTC
Reassigning to Jule for inclusion in 4.17 and 4.18.
Comment 5 Jule Anger 2023-04-14 12:22:23 UTC
Pushed to autobuild-v4-{18,17}-test.
Comment 6 Samba QA Contact 2023-04-14 13:31:21 UTC
This bug was referenced in samba v4-17-test:

0c633912732292f114496773150727fcd39d6400
Comment 7 Samba QA Contact 2023-04-16 16:40:12 UTC
This bug was referenced in samba v4-18-test:

50d90531fae36f54c2d6a5e6cf1aba133473a29c
Comment 8 Jule Anger 2023-04-17 07:24:14 UTC
Closing out bug report.

Thanks!
Comment 9 Samba QA Contact 2023-04-19 10:24:53 UTC
This bug was referenced in samba v4-18-stable (Release samba-4.18.2):

50d90531fae36f54c2d6a5e6cf1aba133473a29c
Comment 10 Samba QA Contact 2023-05-11 07:11:36 UTC
This bug was referenced in samba v4-17-stable (Release samba-4.17.8):

0c633912732292f114496773150727fcd39d6400