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

Segmentation fault in yanglint and yangfuzz due to unprintable characters #773

Closed
jvijtiuk opened this issue Apr 29, 2019 · 1 comment
Closed

Comments

@jvijtiuk
Copy link
Collaborator

jvijtiuk commented Apr 29, 2019

Hi,

this file crashes yanglint due to unprintable characters at the end of the file. Shortening the error message string removes the crash too, so I guess both issues are relevant.

module n00 {
        yang-version 1.1;
        namespace "urn:all";
        prefix all_mod;

        container cont1 {
        uses group1 {
        }
        }

        grouping group1 {
        leaf leaf1 {
                type int64 {
                        range "1000 .. 50000" {
                                error-meeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaeeeeeeeeeeeeeeeee:eeeeeeeeeeeeeeeeeeeeeeeressage
                        "Spec";
                        }
                }
        }
    }
}^@^@^C<E8>  leaf-list llist1 {

Here is the file base64 encoded:

bW9kdWxlIG4wMCB7Cgl5YW5nLXZlcnNpb24gMS4xOwogIAluYW1lc3BhY2UgInVybjphbGwiOwog
IAlwcmVmaXggYWxsX21vZDsKCiAgCWNvbnRhaW5lciBjb250MSB7CiAgICAJdXNlcyBncm91cDEg
ewogICAgCX0KICAJfQoKICAJZ3JvdXBpbmcgZ3JvdXAxIHsKICAgIAlsZWFmIGxlYWYxIHsKICAg
ICAgIAkJdHlwZSBpbnQ2NCB7CiAgICAgICAgCQlyYW5nZSAiMTAwMCAuLiA1MDAwMCIgewogICAg
ICAgICAgCQkJZXJyb3ItbWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVl
ZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVhZWVlZWVlZWVlZWVl
ZWVlZWU6ZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVyZXNzYWdlCiAgICAgICAgICAgIAkJIlNwZWMi
OwogICAgICAgIAkJfQogICAgICAJCX0KICAgIAl9CiAgICB9Cn0AAAPoICBsZWFmLWxpc3QgbGxp
c3QxIHsK

I've encoded the file with b64, rather than using the xxd output, since I assume decoding b64 is somewhat easier than creating the file from xxd. If you would prefer another format for files containing binary data, please let me know.

@ret2libc
Copy link

CVE-2019-20398 was assigned to this issue.

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