Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding error when dealing with 5000 items per subscription #5

Closed
xiaoyanhao opened this issue Nov 14, 2017 · 2 comments
Closed

Decoding error when dealing with 5000 items per subscription #5

xiaoyanhao opened this issue Nov 14, 2017 · 2 comments

Comments

@xiaoyanhao
Copy link

Description

I have been testing your branch feature/SecurityPolicy#Basic128Rsa15_new under the CTT test suite Monitored Item Services/Monitor Items 5000 while using Basic128Rsa15 security policy and SignAndEncrypt security mode and have gotten the following error:

CreateMonitoredItems.Response.ResponseHeader.ServiceResult is Bad: BadDecodingError (0x80070000)

However, all tests pass when using None security policy and None security mode.

@mlgiraud
Copy link
Owner

I'm currently short on time, but will check it out if i have time. If you find the cause in the meantime, feel free to make a pull request.

@mlgiraud
Copy link
Owner

The branch was merged into the open62541 master branch and i think i might have found what caused the issue. I couldn't test it yet. Maybe you could check with the master branch and see if the issue is resolved?

@mlgiraud mlgiraud closed this as completed Sep 7, 2018
mlgiraud pushed a commit that referenced this issue Jan 7, 2019
```
24: ==26126==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x2b44ecb44890 at pc 0x0000005470bc bp 0x2b44ecb3ee00 sp 0x2b44ecb3edf8
24: WRITE of size 8 at 0x2b44ecb44890 thread T1
24:     #0 0x5470bb in mdnsd_out /home/travis/build/open62541/open62541/deps/mdnsd/libmdnsd/mdnsd.c:774:6
24:     #1 0x55112e in mdnsd_step /home/travis/build/open62541/open62541/deps/mdnsd/libmdnsd/mdnsd.c:1235:10
24:     #2 0x152959b in iterateMulticastDiscoveryServer /home/travis/build/open62541/open62541/src/server/ua_services_discovery_multicast.c:490:29
24:     #3 0x59d95a in UA_Server_run_iterate /home/travis/build/open62541/open62541/src/server/ua_server.c:441:13
24:     #4 0x52bd9d in serverloop_lds /home/travis/build/open62541/open62541/tests/server/check_discovery.c:35:9
24:     #5 0x2b44e8c77183 in start_thread /build/eglibc-ripdx6/eglibc-2.19/nptl/pthread_create.c:312
24:     #6 0x2b44e93a703c in clone /build/eglibc-ripdx6/eglibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111
24:
24: Address 0x2b44ecb44890 is located in stack of thread T1 at offset 20848 in frame
24:     #0 0x5509ef in mdnsd_step /home/travis/build/open62541/open62541/deps/mdnsd/libmdnsd/mdnsd.c:1197
24:
24:   This frame has 7 object(s):
24:     [32, 10256) 'm' (line 1199)
24:     [10512, 10516) 'ssize' (line 1203)
24:     [10528, 20528) 'buf' (line 1204)
24:     [20784, 20800) 'from' (line 1205)
24:     [20816, 20832) 'to' (line 1228)
24:     [20848, 20852) 'ip' (line 1229) <== Memory access at offset 20848 partially overflows this variable
24:     [20864, 20866) 'port' (line 1230)
24: HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
24:       (longjmp and C++ exceptions *are* supported)
24: Thread T1 created by T0 here:
24:     #0 0x43462d in __interceptor_pthread_create (/home/travis/build/open62541/open62541/build/bin/tests/check_discovery+0x43462d)
24:     #1 0x52849a in setup_lds /home/travis/build/open62541/open62541/tests/server/check_discovery.c:59:5
24:     #2 0x1615a06 in srunner_run_unchecked_setup.isra.9 (/home/travis/build/open62541/open62541/build/bin/tests/check_discovery+0x1615a06)
24:     #3 0x2b44e92caf44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
```

See also https://travis-ci.org/open62541/open62541/jobs/474897811#L5828
mlgiraud pushed a commit that referenced this issue Jan 7, 2019
```
27: READ of size 4 at 0x7ffe44da68c1 thread T0
27:     #0 0x4eed2b in __asan_memcpy (/home/travis/build/open62541/open62541/build/bin/tests/check_pubsub_connection_udp+0x4eed2b)
27:     #1 0x553464 in UA_Array_copy /home/travis/build/open62541/open62541/src/ua_types.c:1067:9
27:     #2 0x55bf3b in Variant_copy /home/travis/build/open62541/open62541/src/ua_types.c:422:28
27:     #3 0x55938a in copy_noInit /home/travis/build/open62541/open62541/src/ua_types.c:934:23
27:     #4 0x552df5 in UA_copy /home/travis/build/open62541/open62541/src/ua_types.c:959:28
27:     #5 0x14a5d61 in UA_Variant_copy /home/travis/build/open62541/open62541/build/src_generated/ua_types_generated_handling.h:758:12
27:     #6 0x14a5c58 in UA_PubSubConnectionConfig_copy /home/travis/build/open62541/open62541/src/pubsub/ua_pubsub.c:50:23
27:     #7 0x14b5adb in UA_Server_addPubSubConnection /home/travis/build/open62541/open62541/src/pubsub/ua_pubsub_manager.c:44:28
27:     #8 0x52abc5 in AddSingleConnectionWithMaximalConfiguration /home/travis/build/open62541/open62541/tests/pubsub/check_pubsub_connection_udp.c:142:28
27:     #9 0x1615721 in tcase_run_tfun_nofork.isra.11 (/home/travis/build/open62541/open62541/build/bin/tests/check_pubsub_connection_udp+0x1615721)
27:     #10 0x161598d in srunner_run (/home/travis/build/open62541/open62541/build/bin/tests/check_pubsub_connection_udp+0x161598d)
27:     #11 0x5275de in main /home/travis/build/open62541/open62541/tests/pubsub/check_pubsub_connection_udp.c:216:5
27:     #12 0x2b442723ff44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287
27:     #13 0x41af9b in _start (/home/travis/build/open62541/open62541/build/bin/tests/check_pubsub_connection_udp+0x41af9b)
```

See also https://travis-ci.org/open62541/open62541/jobs/474897811#L5964
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants