Bug 2221875 - [iproute]not export functions about new_json_obj
Summary: [iproute]not export functions about new_json_obj
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: iproute
Version: 8.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Hangbin Liu
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-11 06:54 UTC by ying xu
Modified: 2023-07-14 03:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-14 03:29:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-161983 0 None None None 2023-07-11 06:57:03 UTC
Red Hat Issue Tracker RHELPLAN-161984 0 None None None 2023-07-11 06:56:58 UTC

Description ying xu 2023-07-11 06:54:15 UTC
Description of problem:
not export functions about new_json_obj

Version-Release number of selected component (if applicable):
iproute-6.2.0-2.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1.yum install -y kernel-kernel-networking-sctp-bugs-slab_out_of_bounds_inet_diag_msg_sctpladdrs_fill_bz1484351.noarch
2.cd /mnt/tests/kernel/networking/sctp/bugs/slab_out_of_bounds_inet_diag_msg_sctpladdrs_fill_bz1484351
3.yum install -y iproute-devel nmap-ncat lksctp-tools-devel libmnl-devel
4.gcc -o sctp_diag_leak sctp_diag_leak.c -lsctp -lpthread -lnetlink -lmnl

Actual results:
# gcc -o sctp_diag_leak sctp_diag_leak.c -lsctp -lpthread -lnetlink -lmnl
In file included from sctp_diag_leak.c:33:
sctp_diag_leak.c: In function ‘main’:
sctp_diag_leak.c:146:32: warning: passing argument 2 of ‘rtnl_dump_filter_nc’ from incompatible pointer type [-Wincompatible-pointer-types]
  146 |         rtnl_dump_filter(&rth, callback, NULL);
      |                                ^~~~~~~~
      |                                |
      |                                int (*)(const struct sockaddr_nl *, struct nlmsghdr *, void *)
/usr/include/libnetlink.h:161:39: note: expected ‘rtnl_filter_t’ {aka ‘int (*)(struct nlmsghdr *, void *)’} but argument is of type ‘int (*)(const struct sockaddr_nl *, struct nlmsghdr *, void *)’
  161 |                         rtnl_filter_t filter,
      |                         ~~~~~~~~~~~~~~^~~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/libnetlink.a(libnetlink.o): in function `rtnl_echo_talk':
(.text[.text.group]+0x1f78): undefined reference to `new_json_obj'
/usr/bin/ld: (.text[.text.group]+0x1f7f): undefined reference to `open_json_object'
/usr/bin/ld: (.text[.text.group]+0x1f94): undefined reference to `close_json_object'
/usr/bin/ld: (.text[.text.group]+0x1f99): undefined reference to `delete_json_obj'
collect2: error: ld returned 1 exit status


Expected results:
no error

Additional info:

Comment 1 Hangbin Liu 2023-07-14 03:29:30 UTC
Upstream maintainer said the libnetlink is for internal use only. We need to use libmnl instead.


Note You need to log in before you can comment on or make changes to this bug.