The wrapping of pointer arithmetic is undefined behavior. Clang from version 20 onwards will treat an overflow check of the following form: ptr + offset < ptr as always evaluating to false
This bug was referenced in samba master: 2e53f7196f45d28689f25a57fa84995eceee4585 fae07aecfed5b3b8f53bbad4500a0ba4d8785da1 343faf508b5328c239896db8a5bb8f6333f75599 d80c9dac0765a5b114718450ec5a062cd2b6f86f 769cf0a0ddb5c7af65afa5b764c24a3416025745 3287641bbf3360c8241db090781ebc2d5febbc96 b58d7045d5444d70db58d07d7746006ea1b9ecfb 3485f58ea1c2a4013b0ab60c1ddee0faa4eb3eea fb188140357a5d8796c47c5fd88c8a25117bda8e
Created attachment 19000 [details] Proposed patch for V4.23 Job paused in CI This job is stuck because of one of the following problems. There are no active runners online, no runners for the protected branch , or no runners that match all of the job's tags: docker samba-ci-private Go to project CI settings https://gitlab.com/samba-team/devel/samba/-/pipelines/2560467600 But as the 3 preceding steps have succeeded I'm taking this as a pass.
Created attachment 19001 [details] Proposed patch for V4.24
This bug was referenced in samba v4-24-test: bf154a3ed480bacc5bc5452311892ef5ec84405c 7212717cee782af15166acb41db0128ad478de40 b394b0845d1f4f2639a2e5f772491f3638152a49 c99e124aedff59d2fe43cf960c74714198e70296 48ab866b8b3814c7c1dc75b6db7bd082a1320201 e3c8606be10452e77676d357c3afe31dfb786b24 f89835887e1776cd772404956b3217cb15c6fae2 65a87c2e4de9b1a9bfac42ebb602fee0f8965388 b528da253ca7a2db5ee83cd5233037714bf154b5
This bug was referenced in samba v4-23-test: 0129c019f3822f76321e7883ea90d49c3184bc7e 9bed3dc2f912e79787ac3c42e44231a9739a3a8e 4ff95725b48881145fb0e409b65b0a6dcca1044e 3d115fd1c46d69d545e28c2328f2bcadddf6ac80 da619c48c10ab1017f3e454dab6658073780f5f4 2f0fe8c2884870825fcc08054e2b5835337fe56e f3bef4a8d9fe858751e0040ef01c11eabfe4e799 0d0a209748bb13033d8cc38ea92490c19eef1f43 b1443f70b1173ad1521edacad2be4c4a5be8e3f8